Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 01-11-2005, 06:43 PM   #1
Member (2 bit)
 
Join Date: Jul 2004
Posts: 3
Date envionement variable in windows

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.
smithalb is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:21 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2