Topic "Extract File over FTP with Excel Macro"

Author Message
Iceman

Guest


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\WinSCP.com /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\WinSCP.com" /command "open ftp://[[address]]/" "get /[[file]]" "exit"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
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):
http://winscp.net/eng/docs/scriptcommand_get
Advertisements

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License