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

martin

Re: Extract File over FTP with Excel Macro

The problem is probably that you do not specify a target path for the download (the second argument of the get command):
https://winscp.net/eng/docs/scriptcommand_get
Iceman

Extract File over FTP with Excel Macro

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"