Open Tech Support
Open 

Tech Support Community
Back to HomeCommunityReviewsGuidesDownloadsLinkageMarketplaceContact Us

 »  Forum Navigation

Home
Post a Question
About Our Site
Support Our Site

What is this site?
Who are we?

Tolitz.Com - The Cynic Eye of the Third World Guy

Enhanced with Snapshots

 

 »  Advertisement


Go Back   Open Tech Support Community > SUPPORT FORUMS > Software




Reply

 

LinkBack Thread Tools
Old 01-11-2005, 04:41 PM   #1 (permalink)

Junior Member
 
Join Date: Jan 2004
Posts: 14


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
Sponsored Links
Old 01-11-2005, 04:48 PM   #2 (permalink)

Weekend Tinkerer
 
kermit_fr0gg's Avatar
 
Join Date: Dec 2004
Location: Toronto, Ontario, Canada
Posts: 108


Re: Date envionement variable in windows

I haven't written a single line of script or code in years but I think your line should be :

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

Because if you put your variable inside the text delimiters, it will be treated as text and won;t be recognized as a variable.

Please let me know if my suggestion works.
kermit_fr0gg is offline   Reply With Quote
Old 01-12-2005, 12:01 PM   #3 (permalink)

Junior Member
 
Join Date: Jan 2004
Posts: 14


Re: Date envionement variable in windows

No that does not work either. I do not know if double quote are the delimiter. Here is the error message.

Two or more parameters that could be a volume exist.
There can be only one drive letter or volume mount point parameter.

Any other suggestions?
smithalb is offline   Reply With Quote
Reply

Bookmarks

Thread Tools


Similar Threads

Thread Thread Starter Forum Replies Last Post
Windows will not start up Beezo Miscellaneous 3 09-06-2005 01:30 AM
DirectX 9.0 and Games Workdawg PC Gaming 5 11-29-2003 12:09 AM
Windows XP SP 1 To Include Anti-Piracy Features TotalRecall General News 5 10-03-2002 08:09 PM
Large Criminal Hacker Attack Windows NT E-Banking and E-Commerce Sites -Memnoch- General and Off Topic 0 03-09-2001 01:13 AM
Why you should buy Windows 2000 Ion Silverbolt Software 6 12-22-2000 11:14 PM







Powered by vBulletin® Version 3.8.2. Copyright © 2000-2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2
Copyright 2000-2008 Open Tech Support.  All Rights Reserved.  Site Design and Development by Tolitz Rosel.