Hi,
I'm trying to write a batch file that changes the system date to 01/01/01, runs a program, and once that program has completed, set the system date back.
Now, my batch file creation s a little rusty,but So far I have some up with :-
@echo off
ECHO | DATE /t > C:\CUR-DATE.bat
COLOR 2f
date 01/01/2003
cls
echo Running program.
thefileineedtorun.exe
CALL C:\CUR-DATE.bat
ECHO @SET CUR-DATE=%%4 > C:\CURRENT.BAT
date %CUR-DATE%
SET CUR-DATE=
DEL c:\CUR-DATE.BAT
DEL c:\CURRENT.BAT
exit
But I'm being told that - '21' is not recognized as an internal or external command, operable program or batch file.
Prob a classic schoolboy error, but some help would be great.
Thanks in advance
Smoothas
I'm trying to write a batch file that changes the system date to 01/01/01, runs a program, and once that program has completed, set the system date back.
Now, my batch file creation s a little rusty,but So far I have some up with :-
@echo off
ECHO | DATE /t > C:\CUR-DATE.bat
COLOR 2f
date 01/01/2003
cls
echo Running program.
thefileineedtorun.exe
CALL C:\CUR-DATE.bat
ECHO @SET CUR-DATE=%%4 > C:\CURRENT.BAT
date %CUR-DATE%
SET CUR-DATE=
DEL c:\CUR-DATE.BAT
DEL c:\CURRENT.BAT
exit
But I'm being told that - '21' is not recognized as an internal or external command, operable program or batch file.
Prob a classic schoolboy error, but some help would be great.
Thanks in advance
Smoothas