Schedule a batch file with parameters containing spaces
- by Danilo Brambilla
Hi,
I need to schedule a task in Windows Server 2003 that executes this script that deletes files older that n days in the specified folder. The script needs 3 parameters:
%1 path to folder where files need to be deleted
%2 file names (es. *.log)
%3 number of days
@echo off
forfiles -p %1 -s -m %2 -d -%3 -c "cmd /c del /q @path"
The script…