Topic "Facing problem to get recent file"

Author Message
Prashanth

Guest


Hi
i wanted to download the most recent file from the remote directory please see the below script

get filemask="*>1d"

get filemask="*<1d"

i used both the scripts but the result is same like it downloads all the files from remote directory.

and even my question is how to pass the specific timestamp into my script or batch file.

please help me to sort out from this

Thanks
Prashanth
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
First you are missing a dash before filemask. It should be: get -filemask="*>1d".
Second that command does not download the most recent file, it downloads all files created/modified in the last 24 hours. What may happen to be all files in the directory.
To download the most recent file, refer to:
http://winscp.net/eng/docs/script_download_most_recent_file

Quote:
and even my question is how to pass the specific timestamp into my script or batch file.

That's quite broad question.
See
http://winscp.net/eng/docs/scripting#arguments
http://winscp.net/eng/docs/script_upload_multiple_servers
_________________
Martin Prikryl
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