Topic "Moving file with a specific modified date"

Author Message
mbaybarsk
[View user's profile]

Joined: 2015-10-29
Posts: 1
Hi Folks,

I'm completely new to WinSCP scripting and I need to come up with a filemask that needs to select files that were created/modified exactly between 11:00 AM and 11:01 AM.

I wonder if this would work:


mv *.*>=11:00<=11:01

OR do I need to have a date before the time?

If yes, can I use %TIMESTAMP% such as:

mv *.*>=%TIMESTAMP#yyyy-mm-dd% 11:00<=%TIMESTAMP#yyyy-mm-dd% 11:01

Thanks,
B
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
mbaybarsk wrote:
mv *.*>=%TIMESTAMP#yyyy-mm-dd% 11:00<=%TIMESTAMP#yyyy-mm-dd% 11:01

This is correct. Just you need to close the mask to double-quotes as it contains spaces:

mv "*.*>=%TIMESTAMP#yyyy-mm-dd% 11:00<=%TIMESTAMP#yyyy-mm-dd% 11:01"
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