Sometimes its difficult to debug the batch files to trace the errors.
One simple way is to just add:
~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S
Following command will disable displaying your commands / statements from the batch files.
So the execution looks clean.
format-date-and-time-in-a-windows-batch-script
Provides a way to format the time stamp in nice way in batch command.
~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S
One simple way is to just add:
@echo onThis will print all the statements executed in the batch file and you can know the error line.
~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S
Following command will disable displaying your commands / statements from the batch files.
So the execution looks clean.
@echo off~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S
format-date-and-time-in-a-windows-batch-script
Provides a way to format the time stamp in nice way in batch command.
set "ts=%dt:~0,4%%dt:~4,2%%dt:~6,2%_%dt:~8,2%%dt:~10,2%%dt:~12,2%"You may use it in script to log data.
~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S~S
No comments:
Post a Comment