Why does the command forfiles list files that are not a day old despite the command being otherwise?

Posted by PeanutsMonkey on Super User See other posts from Super User or by PeanutsMonkey
Published on 2012-09-18T19:42:08Z Indexed on 2012/09/18 21:41 UTC
Read the original article Hit count: 254

Filed under:
|

The command I am executing is forfiles -p"C:\testdata" -m*.* -d-1 -c"cmd /c echo @PATH\@FILE"

I have specified that I wish to only list files that are a day old however when I execute the statement, it returns me a list of files that were created today.

Why is that? Am I doing something wrong? Would it be better to specify a time period as opposed to a date e.g. 24 hours?

The version of forfiles I have reads as follows FORFILES v 1.1 - [email protected] - 4/98. The batch file is being run on Windows XP.

© Super User or respective owner

Related posts about windows-xp

Related posts about batch