0

I want to access last modified date-time, written in "date modified" column in windows, for a folder. I can do this for a file using

forfiles /P "C:\Users" /S /D -10  | find /c /v

but how to do it for a folder?

1 Answer 1

1

Regardless of erroneous pipe to find and in view of next two commands give the same output:

  • forfiles /P "C:\Users" /S /D -10
  • forfiles /P "C:\Users" /S /D -10 /C "cmd /C echo @file"

Hence, next command outputs folder names (fully qualified paths, in a matter of fact) only:

forfiles /P "C:\USERS" /d -10  /C "cmd /C if /I @isdir==true echo @path"

Read forfiles /? or FORFILES.exe: Select a file (or set of files) and execute a command on each file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.