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

Author Message


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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24757
Location: Prague, Czechia
That does not make sense.

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

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License