Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Andrew89

Re: VBA script to download files from excel only downloads each file once.

martin wrote:

That does not make sense.

Please attach a full session log file showing the problem (using the latest version of WinSCP).


It have many sense because I have to do this in my work, I have to copy 20 excel books to a local file and after execute the macros to filter all this data books to a new book.
martin

Re: VBA script to download files from excel only downloads each file once.

That does not make sense.

Please attach a full session log file showing the problem (using the latest version of WinSCP).
PanV

VBA script to download files from excel only downloads each file once.

Hi all.

I am using WinSCP's vba example to download files via excel macros. (eventually I want these files opened, based on chosen date inputs, as individual worksheets in the workbook with the macro to download the files, so I can create reports)

I have successfully gotten the code to download files from the SFTP server into a local directory of my choosing, opting to NOT delete the files from teh server once downloaded.

However, once a file has been downloaded, if I delete the files from the local directory and run the macro again, it does not download the same files again. If I try another directory that I have not touched yet, it downloads the files just fine. But again, I can only download each file once to a local directory via this code.
How can I ensure that the same files are downloaded each time when prompted?

Many thanks