Tech Support Guy banner
Status
Not open for further replies.
1 - 1 of 1 Posts

· Registered
Joined
·
4 Posts
Discussion Starter · #1 ·
I want to create log files for a process I am automating in WinXP. Included the log file name,1 I want to have the date when the scheduled task ran. I have tried using the %DATE% environment variable without any success. The line which does not work is below.

defrag C:\ /v >"C:\Program Files\Disk Defragmenter\Logs\Defrag_log_%DATE%.txt"

Does any one know why the current date will not print out? Do I need a delimiter around %DATE% or something? Thanks.
 
1 - 1 of 1 Posts
Status
Not open for further replies.
Top