1.

Solve : Files older than supplied date?

Answer»

I need advice on how to create a bat file that will find files LESS than a specific date (date to be passed as a PARAMETER) for a specific directory and all of its'  subdirectories.here is a beginning thought


dir  /a /od will GIVE you a list of files in a directory sorted by date

dir  /a /od > filelist will produce a text file called filelist
that will show you the list of files in a directory sorted by filedate

dir  /a /od /s > filesub will produce the directory with all the dates in date order plus those in subdirectories

i am not SURE if this will solve your problem but it should helpActually, what I need is within a bat file to be able to access the file date and programmatically compare that to a particular date ENTERED as a parameter to the bat file.  I don't think there is a dos command that will just return the filename and date; but thought I would ask anyway.



Discussion

No Comment Found