Computing.Net > Forums > Disk Operating System > Name changing with datestamp

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Name changing with datestamp

Reply to Message Icon

Original Message
Name: John
Date: September 24, 2002 at 01:21:22 Pacific
Subject: Name changing with datestamp
OS: Win 2000
CPU/Ram: n/a
Comment:

I need to rename an auto generated .txt file with a datestamp. I thought I would set it up on a batch file that runs daily. For example, "LOG.txt" would become "dd-mm-yyLOG.txt".

I know there have been previous questions like this on the notice boards, but I couldn't find one that works with a Win 2000 command line.

Any suggestions? Happy to consider a complete alternative to a shell script if there's a better way...


Report Offensive Message For Removal


Response Number 1
Name: Secret_Doom
Date: September 24, 2002 at 10:59:36 Pacific
Reply: (edit)

John wrote:
> I know there have been previous
> questions like this on the notice
> boards, but I couldn't find one
> that works with a Win 2000 command
> line.

Yep, that's a FAQ. Have you tryed the solution presented on my FAQ?

FAQ #02 - Get date into a variable without separators
http://www.batch.hpg.com.br/index.htm#02

My site supports batch scripting under Win9x, but that is a special FAQ which has NT support as well.

-- Leonardo Pignataro - Secret_Doom --

secret_doom@hotmail.com
www.batch.hpg.com.br


Report Offensive Follow Up For Removal







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








Do you have a Desktop Computer anymore?

No
Yes, but only at work
Yes, but its rarely used
Yes, and its a workhorse


View Results

Poll Finishes Today.
Discuss in The Lounge
Poll History




Data Recovery Software