Help in DOS

February 6, 2009 at 10:01:57
Specs: Windows XP
Can you please help to create a batch file which will search a given directory (can be passed as command line argument), and looks for all the files under it or under its subdirectories which are created/modified after a certain date (can be passed as command line argument) for example 1/1/2009, and copy those files under another directory (of another drive) with the same folder path as of original directory.

c:\1\a.txt - modified on 1/1/2009
c:\1\2\b.txt - modified on 1/1/2008
c:1\2\c.txt - modified on 1/1/2009
c:\1\2\3\d.txt - modified on 1/1/2009

then after executing the batch file
<.bat file name> <sourcefolder> <destfolder> <startsate>
myBatchFile.bat c:/1 d 1/1/2009
the result will be like
d:\<todaydate>\1\a.txt - modified on 1/1/2009
d:\<todaydate>\1\2\c.txt - modified on 1/1/2009
d:\<todaydate>\1\2\3\d.txt - modified on 1/1/2009

help is greatly appreciated.

See More: Help in DOS

Report •

February 6, 2009 at 14:52:57
Much depends on the version of DOS.

Try xcopy /? and see if your ver supports /D:m-d-y

If at first you don't succeed, you're about average.


Report •
Related Solutions

Ask Question