D
David
Running Windows 2000 SP2
The batch file works just fine when started outside of the scheduled
tasks, but when run as a scheduled task it fails.
I believe it is a problem with the Command Extensions - ie. my batch
file is using them, and they are not enabled. I get the following
errors :
'date /t' is not recognized as an internal or external command,
operable program or batch file.
'time /t' is not recognized as an internal or external command,
operable program or batch file.
The lines are :
for /f "tokens=1,2,3,4* delims=/ " %%K in ('date /t') do set day=%%L &
set month=%%M & set year=%%N
for /f "tokens=1,2 delims=: " %%T in ('time /t') do set hour=%%T & set
minute=%%U
It's an inherited script, and I have evidence of it working in the
past. I have a suspicion that SP2 has been applied since that time.
The ultimate goal is to rename a file with a time and date included
before archiving it. If there is an alternative way then I'm more
than happy to ditch what I've got now!!
TIA
David.
The batch file works just fine when started outside of the scheduled
tasks, but when run as a scheduled task it fails.
I believe it is a problem with the Command Extensions - ie. my batch
file is using them, and they are not enabled. I get the following
errors :
'date /t' is not recognized as an internal or external command,
operable program or batch file.
'time /t' is not recognized as an internal or external command,
operable program or batch file.
The lines are :
for /f "tokens=1,2,3,4* delims=/ " %%K in ('date /t') do set day=%%L &
set month=%%M & set year=%%N
for /f "tokens=1,2 delims=: " %%T in ('time /t') do set hour=%%T & set
minute=%%U
It's an inherited script, and I have evidence of it working in the
past. I have a suspicion that SP2 has been applied since that time.
The ultimate goal is to rename a file with a time and date included
before archiving it. If there is an alternative way then I'm more
than happy to ditch what I've got now!!
TIA
David.