Page 1 of 1

Batch script to read files created after 5PM

Posted: 09 Mar 2019 05:51
by Codesearcher
Hi All,
I am looking for a Batch command that can retrieve the files created in a folder after 5PM.

Eg:
List of files created on folder after 5:00:05 PM on a day while I have the date in form of string, how can I write a command to do it?
Pretty new to scripting and this forum.

Please help.

Re: Batch script to read files created after 5PM

Posted: 10 Mar 2019 06:38
by aGerman
That's by far not enough information. Batch doesn't have any datatime value type. For that reason we have to treat a date and time as string anyway. But in this case the format would be important because unfortunately everything is localized. E.g. the content of the %date% variable could be something like
Sun 03/10/2019 or
2019-03-10 or
10.03.2019

What we don't know is:
a) what format does "I have the date in form of string" mean?
b) what kind of localized string does ~t format specifier of a FOR variable produce
c) "after 5:00:05 PM" until when? (Even though I don't think we would even get seconds.)

Steffen