SUMMARY
MS-DOS versions before 6.x do not provide a direct means of deleting a file
based upon its creation date. However, you can perform this function by
using a sequence of MS-DOS commands, executed from the directory in which
the files to be deleted reside, as follows:
md newfiles (Creates subdirectory NEWFILES)
xcopy *.* newfiles /d:date (Copies all files from current
directory created on or after
date to the subdirectory
NEWFILES*)
del *.* (Deletes all files in current
directory)
xcopy newfiles (Copies files from NEWFILES to
current directory)
del newfiles (Deletes all files in subdirectory
NEWFILES)
rd newfiles (Removes subdirectory NEWFILES)
• Please note that this procedure requires enough free disk space to maintain two copies of all of the files in the current
directory that will be saved.
With MS-DOS version 6.x the final two steps can be replaced with: