# changing names of hundreds of files at once

**URL:** <https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395>\
**Category:** Factual Questions\
**Created:** [August 14, 2009, 12:44pm UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395 "2009-08-14T12:44:24Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sigene](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@Sigene](https://boards.straightdope.com/u/Sigene)\
**Post date:** [August 14, 2009, 12:44pm UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/1 "2009-08-14T12:44:24Z")

</div>

I have about 1000 files that I want to change the names of. They are all in the format of AAABBBB.xyz

I want to remove the AAA part on all of the files and possible replace it with CCC.

Can I do this easily without having to go to each file, right click to rename…etc.

---

<div class="post-metadata">

**Author:** ![tim-n-va](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tim-n-va/32/3001_2.png) [@tim-n-va](https://boards.straightdope.com/u/tim-n-va)\
**Post date:** [August 14, 2009, 1:03pm UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/2 "2009-08-14T13:03:10Z")

</div>

Assuming you are using some variant windows and have a spreadsheet, here is a rough outline of a process. Hopefully someone will post a better option.

1. Get a list of the files (drop to a command window and dir/b is one option)
2. Paste the results into a spreadsheet
3. Use the text functions to generate “rename” statements
4. Paste the statements into a batch file and run it.

---

<div class="post-metadata">

**Author:** ![Quartz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/quartz/32/267_2.png) [@Quartz](https://boards.straightdope.com/u/Quartz)\
**Post date:** [August 14, 2009, 1:17pm UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/3 "2009-08-14T13:17:20Z")

</div>

I’m assuming this is Windows and that the files are in the same directory.

You want to open a command prompt and use something along the lines of

FOR %f in (a b c … z) do for %g in (a … z) do for %h in (a … z) do for %i in (a … z) do if exist AAA%f%g%h%i ren AAA%f%g%h%i CCC%f%g%h%i

You’ll need to expand the a…z elements.

Look at the help for the FOR command for more info.

---

<div class="post-metadata">

**Author:** ![misling](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@misling](https://boards.straightdope.com/u/misling)\
**Post date:** [August 14, 2009, 2:07pm UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/4 "2009-08-14T14:07:27Z")

</div>

I use this thing [http://sourceforge.net/projects/batchrenamer/](http://sourceforge.net/projects/batchrenamer/)

---

<div class="post-metadata">

**Author:** ![lost4life](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@lost4life](https://boards.straightdope.com/u/lost4life)\
**Post date:** [August 14, 2009, 2:31pm UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/5 "2009-08-14T14:31:26Z")

</div>

I use [bulkrenameutility](http://www.bulkrenameutility.co.uk/). Works like a charm and has many options for renaming, removing/replacing characters, etc. Best of all, it’s free.

---

<div class="post-metadata">

**Author:** ![lissener](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lissener/32/6139_2.png) [@lissener](https://boards.straightdope.com/u/lissener)\
**Post date:** [August 14, 2009, 3:23pm UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/6 "2009-08-14T15:23:37Z")

</div>

I use [Rename Maestro](http://www.renamemaestro.com/AboutUs.aspx).

---

<div class="post-metadata">

**Author:** ![KneadToKnow](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kneadtoknow/32/3999_2.png) [@KneadToKnow](https://boards.straightdope.com/u/KneadToKnow)\
**Post date:** [August 14, 2009, 3:32pm UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/7 "2009-08-14T15:32:30Z")

</div>

> [@tim-n-va](#):
>
> Assuming you are using some variant windows and have a spreadsheet, here is a rough outline of a process. Hopefully someone will post a better option.
> 
> 1. Get a list of the files (drop to a command window and dir/b is one option)
> 2. Paste the results into a spreadsheet
> 3. Use the text functions to generate “rename” statements
> 4. Paste the statements into a batch file and run it.

This is exactly how I do it. Well, except I don’t “paste the results into a spreadsheet,” I do **dir /b \> file.txt** and open **file.txt** in the spreadsheet.

---

<div class="post-metadata">

**Author:** ![Cuckoorex](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@Cuckoorex](https://boards.straightdope.com/u/Cuckoorex)\
**Post date:** [August 17, 2009, 3:33pm UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/8 "2009-08-17T15:33:11Z")

</div>

I’m glad someone asked this question, I’ve been meaning to do so for a while…I’ll have to check out some of those options as well.

Also, I initially read the thread title as “changing names of hundreds of \*\*flies \*\*at once,” and I was thinking, “you own hundreds of flies as pets?” 🙂

---

<div class="post-metadata">

**Author:** ![Nanoda](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Nanoda](https://boards.straightdope.com/u/Nanoda)\
**Post date:** [August 17, 2009, 4:21pm UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/9 "2009-08-17T16:21:17Z")

</div>

> [@Sigene](#):
>
> They are all in the format of AAABBBB.xyz
> 
> I want to remove the AAA part on all of the files and possible replace it with CCC.

If it’s an MS OS, and you’re not making the filenames longer, just go

```auto

ren AAA* CCC* 

```

(If they’re using 8.3 filenames, and you try to prepend longer text, the result could be not what you want. If they’re using long filenames already, it’s okay.) 🙂

---

<div class="post-metadata">

**Author:** ![GaryM](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/garym/32/241_2.png) [@GaryM](https://boards.straightdope.com/u/GaryM)\
**Post date:** [August 18, 2009, 3:00am UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/10 "2009-08-18T03:00:18Z")

</div>

I’ve been using The Rename for years and it works very well.

[http://the-rename.herv-thouzard.qarchive.org/](http://the-rename.herv-thouzard.qarchive.org/)

---

<div class="post-metadata">

**Author:** ![CurtC](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@CurtC](https://boards.straightdope.com/u/CurtC)\
**Post date:** [August 18, 2009, 3:06am UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/11 "2009-08-18T03:06:50Z")

</div>

I’m with Nanoda - Windows already has a rename command with wildcards. Why go with an additional utility when the capability has been part of Microsoft OS’s for 20 years?

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [August 19, 2009, 12:14am UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/12 "2009-08-19T00:14:42Z")

</div>

Um, I’m sure those aren’t _literal_ ‘A’ characters.

---

<div class="post-metadata">

**Author:** ![Fetchund](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@Fetchund](https://boards.straightdope.com/u/Fetchund)\
**Post date:** [August 19, 2009, 1:29am UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/13 "2009-08-19T01:29:38Z")

</div>

Bulk Rename Utility, mentioned above. I use it for work, and it has been a gem.

---

<div class="post-metadata">

**Author:** ![Savannah](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@Savannah](https://boards.straightdope.com/u/Savannah)\
**Post date:** [August 19, 2009, 1:39am UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/14 "2009-08-19T01:39:43Z")

</div>

I just select the files in Windows Explorer, F2 to rename, and enter the new name. It renames them all like Filename (1).doc, Filename (2).doc, etc. Would this work for you?

---

<div class="post-metadata">

**Author:** ![brad\_d](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@brad\_d](https://boards.straightdope.com/u/brad_d)\
**Post date:** [August 19, 2009, 7:22am UTC](https://boards.straightdope.com/t/changing-names-of-hundreds-of-files-at-once/506395/15 "2009-08-19T07:22:01Z")

</div>

I’m pretty happy with [Rename Master](http://www.joejoesoft.com/cms/showpage.php?cid=108). It’s free.

It appears to be much more capable than the native Windows rename command, and it’s definitely a lot easier to use. It gives you many options to insert file metadata into the new name, for example; the date a photo was taken is the only thing from the list that I use with any frequency. (I’ve found file renaming in Windows maddening - the wildcards don’t act the way I expect them to and I just screw everything up. I can then go back and fix it with Rename Master…)
