top of page

forfiles command

You can use the Windows command, forfiles, to find which files in a directory have been modified after a certain date. If you right click in the directory you want to review, and select 'Open command window here' . . .

. . . you can get the command prompt and enter the 'forfiles' command followed by the operators /S and /D. [ '/S' directs the command to search all subfolders in the directory.] and then a date preceded by a plus or minus. Using a plus will get all dates after your specified data, a minus will get all dates before it.

The '/D' operator lets you run the search from today's date. So if you want a list of all files modified more than 30 days ago, you'd enter the command this way.

bottom of page