Hi Guys,
I have a following script where I am redirecting my script's output to a log file with date/time stamp:
@echo on
FOR /f "tokens=2-4 delims=/ " %%a in ('DATE/T') do SET mydate=%%c-%%a-%%b
FOR /f "tokens=1-2 delims=: " %%a in ('TIME/T') do SET mytime=%%a-%%b
perl ControlScan.pl > controlscan%mydate%-%mytime%.log
Upon execution, it shows the following error:
time: /t: Not Executable: The system can not find the file specified
Date: Bad Date conversion : /t
Usage: Date [-cu] [+format]
Date [-cut] <date-time>
Does anyone know the solution? Thanks in advance. I really appreciate the response.
Thanks again
GPS
I have a following script where I am redirecting my script's output to a log file with date/time stamp:
@echo on
FOR /f "tokens=2-4 delims=/ " %%a in ('DATE/T') do SET mydate=%%c-%%a-%%b
FOR /f "tokens=1-2 delims=: " %%a in ('TIME/T') do SET mytime=%%a-%%b
perl ControlScan.pl > controlscan%mydate%-%mytime%.log
Upon execution, it shows the following error:
time: /t: Not Executable: The system can not find the file specified
Date: Bad Date conversion : /t
Usage: Date [-cu] [+format]
Date [-cut] <date-time>
Does anyone know the solution? Thanks in advance. I really appreciate the response.
Thanks again
GPS