Topic "Help With Automation Script Please"

Author Message
merlinbrent
[View user's profile]

Joined: 2016-10-20
Posts: 2
Location: UK
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25786
Location: Prague, Czechia
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.
merlinbrent
[View user's profile]

Joined: 2016-10-20
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
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