Computing.Net > Forums > Disk Operating System > Batch Logging and Variables

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch Logging and Variables

Reply to Message Icon

Name: TC75
Date: August 25, 2004 at 02:32:26 Pacific
OS: Win2k/XP
CPU/Ram: 1GB
Comment:

Hi Guys,

I'm trying to write a batch file witch redirects its output to a text file. I would like a new text file to be created for each day the script is run. If the script is run again that day, the file would be appended to. If it is run another day a new file will be created.

I'm using XP/2K and have tried the %DATE% variable without much luck.

This seems to be a common question but I cannot find an answer, is it possible?

Tony




Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: August 25, 2004 at 03:05:23 Pacific
Reply:

[do some task] >> %date%.log


0

Response Number 2
Name: TC75
Date: August 25, 2004 at 04:07:45 Pacific
Reply:

tried that already. It just gives cannot find the path specified. As if its expecting the file to be already created.

TC


0

Response Number 3
Name: Mechanix2Go
Date: August 25, 2004 at 04:15:04 Pacific
Reply:

TC,

That line will create the log in the current directory if it does not exist and will append it if it does.



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


what is inetcfg Laptop CD U/S, how to...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Batch Logging and Variables

mkdir and variables www.computing.net/answers/dos/mkdir-and-variables/16840.html

Batch files and system memory? www.computing.net/answers/dos/batch-files-and-system-memory/2820.html

for loops and variables in DOS www.computing.net/answers/dos/for-loops-and-variables-in-dos/10200.html