Topic "Extract File over FTP with Excel Macro"

Author Message


Hi all,

I'm trying to extract a file over FTP to excel, which then modifies the file and reloads. I'm having issues with the file extraction section. I've written a .bat file that successfully extracts the file, with contents below. However, when I either call the .bat file from Excel (.bat executes, but file not retrieved) or replace that call with...

"Call Shell("C:\Program Files (x86)\WinSCP\ /command " & """open ftp://[[address]]/"" " & """get \[[file]]"" " & """exit""")

... I'm no longer successful. I'm content with either approach (direct from the macro or executing the .bat), but appreciate any suggestions on how to solve this problem.

.bat file:
"C:\Program Files (x86)\WinSCP\" /command "open ftp://[[address]]/" "get /[[file]]" "exit"
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26911
Location: Prague, Czechia
The problem is probably that you do not specify a target path for the download (the second argument of the get command):

You can post new topics in this forum


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