1.

Solve : Adding a log file Batch Files?

Answer»

I want to add a log file to existing batch file/s. My goal is to ensure the user/s are running their files by creating a log with the DATE/TIME STAMP.

Secondary, I code the Echo off but can still see all the files in copies or deletes what am I forgetting to do? :-/ It's been 15 years since I've had to worry about batch files. Thank you!This will work on NT machines only:

echo %username% %0 %date% %time% >> logfile.log

Echo is for batch file statements and whether they get sent back to the screen. Echo has no control over messages ISSUED by individual programs or commands.

Hope this HELPS.



Discussion

No Comment Found