Link to home
Start Free TrialLog in
Avatar of tshearon
tshearonFlag for United States of America

asked on

How to obtain a report on stale directories

We'd like to get a report on home directories that have not had any of their contents updated in over 120 days. These directories are all on the same Windows server and NTFS volume. Does anyone know how to do this?
Avatar of mrandal
mrandal
Flag of United States of America image

I often use sfk command line utility for such stuff. If you are on the server, in the root directory containing all user home directories, type the following all in one line (or a batch file):
sfk list -nosub -justdirs . +run -quiet "sfk list -nohead -late=1 -tabs $qfile" -yes | sfk filter -replace "_\*__" +sort -reverse

Open in new window

Explanation: list all dir names of current directory. run a command on every dir name to list the most recent file showing date and absolute filename. change every filename to just the home folder path. sort all by date in reverse order.

This will create a tab separated list with date, time, and folder name, sorted with oldest home folders at list bottom.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tshearon

ASKER

Thanks billprew. This is exactly what I wanted.
Avatar of Bill Prew
Bill Prew

Great, glad that helped.

~bp