MartynLawson
asked on
Command or script to find last modified date
We have an old file share that currently has over 250,000 files in it, which we are looking to clear out. Does anyone know a simple batch script or command that can be run to query this directory and the subdirectorys for the files last modified date so that I can put this into a spreadsheet for analysis?
Forfiles command can do this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
points neither here nor there bill :-) i did it with a temporary file as felt sure afyer sitting there running for an hour maybe if someone wanted to re-run because it stopped then cpuld re-run from temp file but not that useful!
I split out the path and filename so in excel was easier to find all files in one dir etc. If needed, e.g. To turn on sub totals to group by dir. But doesnt hurt to have full path there either - though once in excel could always just copy a formula down.
Main problem is frankly excel will do 64k lines wont it, or maybe that is lifted in newer versions? if that is the case then would have to split the file every 65000 or so lines or use a VBA macro in excel to read the dir.
Another way and another reason i was going to use a temporary file would be to filter that file using FIND to create say different CSV files for .DOC .XLS :EXE .PPT etc.
Steve
I split out the path and filename so in excel was easier to find all files in one dir etc. If needed, e.g. To turn on sub totals to group by dir. But doesnt hurt to have full path there either - though once in excel could always just copy a formula down.
Main problem is frankly excel will do 64k lines wont it, or maybe that is lifted in newer versions? if that is the case then would have to split the file every 65000 or so lines or use a VBA macro in excel to read the dir.
Another way and another reason i was going to use a temporary file would be to filter that file using FIND to create say different CSV files for .DOC .XLS :EXE .PPT etc.
Steve
Newer versions of Excel (2007, 2010) will handle much more than 64k rows.
We'll wait for the poster to provide further feedback and see where it takes us.
Good day,
~bp
We'll wait for the poster to provide further feedback and see where it takes us.
Good day,
~bp
I actually think Steve's post 35192849 provided a workable and acceptable solution, based on the original requirements.
~bp
~bp
Me too frankly Bill, but it seems that they only have the option of "delete" in general... always used to ask for opinion and go with what everyone was OK with:
https://www.experts-exchange.com/questions/26964168/21-Apr-11-00-Automated-Request-for-Review-Objection-to-Delete-Q-26855260.html?cid=1575&anchorAnswerId=35453212#a35453212
Steve
https://www.experts-exchange.com/questions/26964168/21-Apr-11-00-Automated-Request-for-Review-Objection-to-Delete-Q-26855260.html?cid=1575&anchorAnswerId=35453212#a35453212
Steve
Good by me, thanks!
Implementing revised Cleanup Volunteer recommendation.
Modalot
Community Support Moderator
Modalot
Community Support Moderator