IT Employment

General discussion


All you DOS gurus: got a tough one!

By CVN70_IT2 ·
Okay, so I am the admin guy for a system that creates a log file after the nightly backups. I want to copy the file (which I know how to do) and name it to the current date. I am using the following commands:

FOR /F "tokens=1-4 delims=/ " %i in ('date /t') do set filerename=%j%k%%l
RENAME file.log %filerename%.log
These run fine by themselves, but they don't run in the batch file I created. Does anyone know why? It's killin me! Thanks!

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums