|
Answer» Can anyone help with a command? I am trying to
1.) search a directory for files NOT OLDER THAN, say, 60 days. 2.) then within these files, i have to run a FIND command for a certain text string
I ran the FIND command on the files in the directory but I can't FIGURE out how to do it just on files BASED on a specified time span.
thanks very much,
MarkMark,
the best tool for this is robocopy.exe command line exe file, that you google and download from a microsoft website.
It can do what you need, for e.g. here is the switched that it uses for setting how old files you want to COPY or move:
/MAXAGE:n :: MAXimum file AGE - exclude files older than n days/DATE. /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date. /MAXLAD:n :: MAXimum LAST Access Date - exclude files unused since n. /MINLAD:n :: MINimum Last Access Date - exclude files used since n. (If n < 1900 then n = n days, else n = YYYYMMDD date).
here is a link for more info: http://www.ss64.com/nt/robocopy.html
Geza
|