# DOS REN Command



## jbarlow (Feb 13, 2006)

Hello all,

I know there is an obvious and easy answer to this question, but I cannot figure it out and I was hoping that somebody around here could help, so here goes.

I'm trying to rename a bunch of files in DOS so I don't have to do it by hand. I can somewhat get the REN command to work; simply put, I can change a space in a file name to an underscore using REN "Old Slide Name??.jpg" "Old_Slide_Name??.jpg". 

What I would LIKE to do is change the name as follows. REN "Name_01.jpg" "Name1.jpg", but that command outputs some strange results.

I am running Version 5.1.2600 on Windows XP Pro SP2. I am executing the commands from the directory where the files reside so I do not need the pathnames.

Any and all help would be greatly appreciated.


----------



## Rockn (Jul 29, 2001)

Seems like a waste of time when you could do it in windows explorer much faster than typing the full command line for DOS REN command. There are also lots of freeware batch rename utilities that will be even more efficient. http://www.snapfiles.com/freeware/system/fwfilerename.html


----------



## prodsupptech (Feb 2, 2004)

I create rename batch files everyday using Access. you can do a dir /b > a text file. IMport that text file and run an update query which will take the original name and change it however you want to. within the update to part type "ren" & " " & [filesfield] & " " & " "nameofnewfile" if you export the table to a .bat file you can run it within the directory.


----------



## justfoo (Dec 31, 2004)

Hey Jbarlow,
I've used this utility for quite a while now and like it very much:
http://www.bulkrenameutility.co.uk/Main_Intro.php
It will save you all that trouble of renaming in DOS and is really quite versatile.
Good luck,
DF


----------



## jbarlow (Feb 13, 2006)

Thanks. I will check it out.


----------



## Squashman (Apr 4, 2003)

Lupas Rename is pretty good.
http://www.webattack.com/get/lupasrename.html


----------



## justfoo (Dec 31, 2004)

No problem.
Hey if it works out for you let us all know, and remember to mark this thread solved once you've got something that works for you. 
Regards,
DF


----------



## blaqDeaph (Nov 22, 2005)

Irfran View has a image renaming tool that can come in handy


----------



## JohnWill (Oct 19, 2002)

Personally, I don't see why the original method didn't work.


----------



## blaqDeaph (Nov 22, 2005)

JohnWill said:


> Personally, I don't see why the original method didn't work.


Hes trying to rename name01 to name1, and that causes funky results remember?


----------



## JohnWill (Oct 19, 2002)

The following command works fine for me:

REN "Name_01.jpg" "Name1.jpg"


----------

