Rename long filenames with date time stamp

June 23, 2011 at 07:23:14
Specs: Windows XP
I have found dozens of examples of appending a date/time stamp to a file via Batch files under Windows XP. I need to:

1) append a date time stamp,
2) allow long filenames (spaces, commas, underscores, hyphens, parentheses, etc.),

and most importantly (this is where I get tripped up)

3) allow for wildcards.

e.g.:

file #1 = "blah, June 2011.xls"
file #2 = "June blah blah.mdb"

Output:

file #1 = "blah, June 2011 (06-23-2011 @ 956).xls"
file #2 = "June blah blah (06-23-2011 @ 956).mdb"

It's okay to have multiple lines in the batch file to handle the different file types.

thanks for any help you can provide.


See More: Rename long filenames with date time stamp

Report •

#1
June 24, 2011 at 00:56:46
Is the time-stamp you want in the filename the current date/time or the date/time of File Creation or File Last Written or just some random date/time?

What is the format of your system date/time?


Please come back & tell us if your problem is resolved.


Report •

#2
June 24, 2011 at 05:40:48
Current date/time.

"Date /t" returns "Fri 06/24/2011".


Report •

#3
June 24, 2011 at 15:11:55
I can't help you if you don't/won't answer the questions. Perhaps another member can assist you.

Good luck.


Please come back & tell us if your problem is resolved.


Report •

Related Solutions

#4
June 27, 2011 at 05:38:03
>I can't help you if you don't/won't answer the questions. Perhaps another member
>can assist you.

Excuse me, but I did answer you.

>Is the time-stamp you want in the filename the current date/time or the date/time
>of File Creation or File Last Written or just some random date/time?

I replied "Current date/time.".

>What is the format of your system date/time?

I replied: "Date /t" returns "Fri 06/24/2011".

I don't know who got your panties in such a bunch.

>Good luck.

Whatever. I think you're rude.I'll get help elsewhere. Geesh.


Report •

Ask Question