Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
How can I get a list of files that were created more than 2 days ago? We need this for a tidy up routine - I've looked at options for dir, find etc. but can't seem to see an option
Also I need to identify zero size files if possible.
Thanks

try http://www.easydos.com/dir.html. they have a list of DOS commands including sorting by date & time.

This ~may~ be of help to you. From the latest LangaList newsletter;
=============================================
5) Finding a "Lost Gem"Hi Fred: Love your Plus! edition immensely! Has been regularly helpful, even for an experienced old dog like me... :-) A couple of years ago (well, almost) one of your readers pointed the way to a DOS tool called DELAGE.exe - loved it... and lost it! Now I want it back, but the links that come up in Google (and all other search engines I've tried) either points to your newsletter from July 2000 or the missing site where it used to be available. Can you, or any of your loyal readers, help me get this gem back? Many thanks Paul Ross
"DelAge" is a handy one indeed: It deletes files based on their age, and so is an easy way to clean out older files from a directory/folder or system. You can find it--- and 31 other free and useful files--- at
http://home.mnet-online.de/horst.muc/horst.htm .

XCOPY.EXE have the /D:date switch, which only copies files modified on or after the date given. You could try making something like this:
XCOPY.EXE/l/s/y/d:06042002 \*.*
That will give you the list (no, it will NOT copy any files, because of the /l switch)
Include the /n switch if you want to get the short names format (like PROGRA~1\etc)
After /d: you would put the date from two days ago. Now, calculating that date using the current date is a more complex... I reckon seeing a batch script to do that somewhere on the net, I think you can find it. I reckon it was from Laurence Soucy or maybe Laura Fairhead, but I'm very uncertain.
Type XCOPY/? for more information on using XCOPY.exe.
-- Secret_Doom - Leonardo Pignataro --
secret_doom@hotmail.com
www.batch.hpg.com.br

Ooops, the XCOPY command format is wrong, use it like this:
XCOPY.EXE /l/s/y/d:04-06-2002 \*.* \
BTW, that will search the entire drive
-- Secret_doom - Leonardo Pignataro --
secret_doom@hotmail.com
www.batch.hpg.com.br

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |