Computing.Net > Forums > Disk Operating System > Rename Multipe Files in DOS

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.

Rename Multipe Files in DOS

Reply to Message Icon

Name: harley tucker
Date: February 15, 2004 at 22:16:27 Pacific
OS: Win 98
CPU/Ram: ??
Comment:

I have saved multiple files (3500) files that I need to rename with a letter in front of the numeric file id. Example, files saved as:

1023.t1 1023.t2 1023.y1 1045.t1 1045.t2 ...

I need them to be renamed as follows:

N1023.t1 N1023.t2 N1023.y1 N1045.t1 N1045.t2 etc.

I have tried rename ???.* N???.* with no luck. The "N" replaces the first letter of the current filename.

Any help is much appreciated.

HT



Sponsored Link
Ads by Google

Response Number 1
Name: JackG
Date: February 16, 2004 at 03:05:04 Pacific
Reply:

You did not try very much. The obvious solution that comes to mind is:

For %%i IN (????.*) DO RENAME %%i N%%i

But then it gets interesting.....


0

Response Number 2
Name: harley tucker
Date: February 16, 2004 at 04:46:36 Pacific
Reply:

Jack G. Thanks but I am sorry to report I don't understand.

You write:

"For %%i IN (????.*) DO RENAME %%iN%%i

Could you try to explain to me again how to structure this command relative to filenames such as:

545.t1
545.t2
672.y1


Thanks
HT


0

Response Number 3
Name: dtech
Date: February 17, 2004 at 15:53:04 Pacific
Reply:

Hi Harley
This might help the ? stands for a single
character.

for %%a in (*.t?) do rename %%a N%%a
for %%a in (*.y?) do rename %%a N%%a


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


smartdrive settings for g... net send the net name



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: Rename Multipe Files in DOS

Renaming files in DOS www.computing.net/answers/dos/renaming-files-in-dos/14857.html

Rename files in DOS - How? www.computing.net/answers/dos/rename-files-in-dos-how/8486.html

Shrink files in Dos www.computing.net/answers/dos/shrink-files-in-dos/7662.html