Computing.Net > Forums > Disk Operating System > How do i rename file 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.

How do i rename file in DOS

Reply to Message Icon

Name: Sam
Date: April 28, 2002 at 20:52:17 Pacific
Comment:

well, actually I am using windows xp, and i would like to rename some certain files under dos command.
i am just wondering if someone can tell me how to do it.

say i got files: hello-mp3.mp3
yalo-mp3.mp3
and i would like to rename those file to
hello.mp3
yalo.mp3
with loop and rename function.
thx you



Sponsored Link
Ads by Google

Response Number 1
Name: Tim
Date: April 28, 2002 at 21:45:13 Pacific
Reply:

The standard DOS procedure is:
ren abcdefgh.xxx mnopqrs.yyy

that is: ren oldname.ext newname.ext

in your case:

ren hello-mp3.mp3 hello.mp3

It's as simple as that. DOS is VERY simple and straitforward, you'll see.


0

Response Number 2
Name: W0rm
Date: April 28, 2002 at 22:08:20 Pacific
Reply:

note that if you're using windows you may use spaces if you surround the filenames with quotes:


ren "hello bob.mp3" "bye bob.mp3"
- W0rm
- http://dos.li5.org


0

Response Number 3
Name: Keith
Date: June 27, 2002 at 08:19:16 Pacific
Reply:

I have a similar need - How to I rename a fle so the new name contains the date & time of the file. For example, if the file is file.txt with a date of 06/21/2002 and time of 4:00:00 am The new file will be called 06/21/2002 4-00-00am file.txt. I also want to get the server name where the file is stored at the time fo the rename. So the new file name will be something like

Server 06/21/2002 4-00-00am file.txt

Any ideas


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Batch file, delete direct... Modem 2 modem



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: How do i rename file in DOS

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

How can I remove files in DOS ? www.computing.net/answers/dos/how-can-i-remove-files-in-dos-/10052.html

copying files in use www.computing.net/answers/dos/copying-files-in-use/5247.html