Topic "Moving file with a specific modified date"

Author Message
[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

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
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"

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License