Microsoft > Microsoft DOS

REname a file

(1/1)

carlo:
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

Droppen:
@echo off
Copy PIPPO.txt PIPPO%date%%time%.txt

havent tested...

Droppen:
i mean

@echo off
ren pippo.txt pippo%date%.txt

johnwill:
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.

Navigation

[0] Message Index

Go to full version