Computer Hope

Microsoft => Microsoft DOS => Topic started by: carlo on August 09, 2004, 03:42:31 AM

Title: REname a file
Post by: carlo on August 09, 2004, 03:42:31 AM
Hello.. I need to rename a fille PIPPO.txt in PIPPO+"date today".txt with a batch procedure.
Can you help me??

thank's
bye
Carlo
Title: Re: REname a file
Post by: Droppen on August 09, 2004, 05:26:01 AM
@echo off
Copy PIPPO.txt PIPPO%date%%time%.txt

havent tested...
Title: Re: REname a file
Post by: Droppen on August 09, 2004, 05:32:17 AM
i mean

@echo off
ren pippo.txt pippo%date%.txt
Title: Re: REname a file
Post by: johnwill on August 09, 2004, 09:16:06 AM
Somehow, I think "Mon 08/09/2004" is not a valid string for a file name.  Also, "11:12:37.06" doesn't appear to be valid for file names either, so the simple approach isn't going to work. :)

I'd grab one of the many batch file enhancers from http://garbo.uwasa.fi/pc/ and use that.