# Is there an easy way to rename many files at once?

**URL:** <https://boards.straightdope.com/t/is-there-an-easy-way-to-rename-many-files-at-once/99703>\
**Category:** Factual Questions\
**Created:** [March 23, 2002, 2:13pm UTC](https://boards.straightdope.com/t/is-there-an-easy-way-to-rename-many-files-at-once/99703 "2002-03-23T14:13:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ariadne](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Ariadne](https://boards.straightdope.com/u/Ariadne)\
**Post date:** [March 23, 2002, 2:13pm UTC](https://boards.straightdope.com/t/is-there-an-easy-way-to-rename-many-files-at-once/99703/1 "2002-03-23T14:13:08Z")

</div>

I need to change a few letters in the names of about 400 files. I tried the ren command in DOS, but that shortened the names too. I looked for information on Google, and found out that this would have been an easy task if I had WindowsXP, but I have Windows95. Is there some sort of dos command that changes the same few letters in the name, but doesn’t shorten it? Any help would be appreciated, I feel like my hand is going to fall off if I renumber any more of these by hand.

---

<div class="post-metadata">

**Author:** ![whitetho](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/whitetho/32/1059_2.png) [@whitetho](https://boards.straightdope.com/u/whitetho)\
**Post date:** [March 23, 2002, 2:52pm UTC](https://boards.straightdope.com/t/is-there-an-easy-way-to-rename-many-files-at-once/99703/2 "2002-03-23T14:52:05Z")

</div>

Could you give an example of both a before and after name? That would make it easier to test ideas.

---

<div class="post-metadata">

**Author:** ![handy](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@handy](https://boards.straightdope.com/u/handy)\
**Post date:** [March 23, 2002, 3:16pm UTC](https://boards.straightdope.com/t/is-there-an-easy-way-to-rename-many-files-at-once/99703/3 "2002-03-23T15:16:17Z")

</div>

Yep, try [download.com](http://download.com) search for ‘rename’ youll find plenty of programs to do this for you.

---

<div class="post-metadata">

**Author:** ![AZCowboy](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AZCowboy](https://boards.straightdope.com/u/AZCowboy)\
**Post date:** [March 23, 2002, 3:27pm UTC](https://boards.straightdope.com/t/is-there-an-easy-way-to-rename-many-files-at-once/99703/4 "2002-03-23T15:27:15Z")

</div>

Let’s say your files are named:

abc001.txt  
abc002.txt  
.  
.  
.  
abc400.txt

and you want them to be:

xyz001.txt  
xyz002.txt  
.  
.  
.  
xyz400.txt

Then from a DOS prompt, in that directory,

_rename abc.txt xyz_.txt\*\*

Is that what you need?

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [March 23, 2002, 3:45pm UTC](https://boards.straightdope.com/t/is-there-an-easy-way-to-rename-many-files-at-once/99703/5 "2002-03-23T15:45:08Z")

</div>

If you are good with a text editor, you can use a batch file:

list the files and stuff them into say foo.bat

edit the lines of the file so they say something like

ren oldname.foo newname.goo

then execute the bat file.

I’d give more details on how I do this but I use unix-under-dos  
commands which you probably don’t have. (If fact, this is quite  
easy using [cygwin](http://www.cygwin.com) .)

---

<div class="post-metadata">

**Author:** ![AHunter3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ahunter3/32/368_2.png) [@AHunter3](https://boards.straightdope.com/u/AHunter3)\
**Post date:** [March 23, 2002, 6:05pm UTC](https://boards.straightdope.com/t/is-there-an-easy-way-to-rename-many-files-at-once/99703/6 "2002-03-23T18:05:16Z")

</div>

I’m mainly a Mac person, so don’t make fun of me if I get this wrong, but I think you can rename PC files with DOS commands and retain / use long file names by using quotation marks. (Also allows you to use spaces in file names).
