Help With Automation Script Please

Advertisement

merlinbrent
Joined:
Posts:
2
Location:
UK

Help With Automation Script Please

Hi,

I have this script...

open ftp://user:pass@ftpserver.com/
cd /
option transfer binary
get -latest *.*
close
exit

That is supposed to connect to an FTP server, and download ONLY the latest file. Based on what I've read my syntax looks correct. But it doesn't work.

If I exclude the latest command and just use *.* this works fine, but downloads all of the files, when I only require the latest one.

Any help provided is much appreciated.

Thanks
Martin

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,392
Location:
Prague, Czechia

Re: Help With Automation Script Please

What does "doesn't work" mean? What does it do?

Are you using the latest version of WinSCP?

If you are, please attach a full session log file showing the problem.

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

merlinbrent
Joined:
Posts:
2
Location:
UK

No I wasn't using the latest version, my bad. I've downloaded the latest version and this seems to be working fine now.

Many thanks and sorry for wasting your time on this.

Thanks
Martin

Reply with quote

Advertisement

You can post new topics in this forum