Moving file with a specific modified date

Advertisement

mbaybarsk
Joined:
Posts:
1

Moving file with a specific modified date

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Moving file with a specific modified date

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"

Reply with quote

Advertisement

You can post new topics in this forum