I am trying to build a batch file that deletes all excel files older than 30 days. So far I have the command:
forfiles -p"N:\QC\ATR's" -s -m*.xls* -d-30 -c"CMD /C del /f /q @FILE"
The only problem seems to be the fact that @FILE has a space in the folder/file name so the del command cannot find the specified path. For example, looking at the echoes from the command it says
Could Not Find N:\QC\ATR's\'-5
When it should really be looking for the path
N:\QC\ATR's\-5 brightness study
See what I mean? Is there a way to tell the @FILE variable to be wrapped in quotes or something?
Thanks
I figured it out. I just added Hex coded qoutes around the file variable