Batch file to delete files over 10 days old

May 20, 2010 at 02:26:00
Specs: Windows XP
Hi,

Can someone please help me I need to create
a batch file that deletes files over 10days old.
I have managed to do this but this will not
delete files with spaces in the name, any
ideas?

forfiles "-pC:\Documents and
Settings\admin\Desktop\New Folder" -m*.* -d-
10 -s -c"cmd /c del /k @FILE| echo @FILE"

thanks
Harj


See More: Batch file to delete files over 10 days old

Report •

#1
May 20, 2010 at 04:29:20
There are no spaces in DOS filenames.

FORFILES & CMD are not part of DOS.


=====================================
Helping others achieve escape felicity

M2


Report •

#2
May 20, 2010 at 06:07:55
so is there anyway to deleted the file in the folder, even tough the
files have names with spaces?

Report •
Related Solutions


Ask Question