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

Advertisement

PanV
Guest

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

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).

Reply with quote

Andrew89
Guest

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.

Reply with quote

Advertisement

You can post new topics in this forum