Sie sind auf Seite 1von 6

7/21/13

How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files

How-To Geek

How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files

Windows comes with a variety of ways to rename multiples files at once from Windows Explorer, the Command Prompt, or PowerShell. Whether youre looking for an easy-to-use graphical interface or a powerful command-line method, youll find it here. The Windows Explorer method is fast, but lacking in flexibility. PowerShell is extremely flexible but it can be intimidating if youre new to PowerShell. If youre looking for a powerful graphical interface, a third-party utility is your best bet.

Windows Explorer
Windows Explorer has a quick, built-in way to rename multiple files at once, although its pretty well hidden. To get started, locate the files you want to rename and place them in the same folder. Use the columns at the top of the list in details view to order the files how youd like them Windows Explorer will number the files starting from the top at the list.

Select all the files you want to rename, right-click the first one and select Rename. Type your desired base file name and press Enter.

www.howtogeek.com/111859/how-to-batch-rename-files-in-windows-4-ways-to-rename-multiple-files/

1/6

7/21/13

How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files

Windows Explorer will take your base name and add a number to each files name. This method is good for cleaning up messy names, although it isnt very flexible.

Command Prompt
You can use the rename or ren DOS command in a Command Prompt window to rename multiple files at once. It accepts the wildcard character * to match multiple files. The quickest way to open a Command Prompt window at your desired location is to hold Shift, right-click in the folder, and select Open command window here.

The most obvious use case for the rename command is changing multiple file extensions at once something you cant do in Windows Explorer. The following command will rename all .html files in the current folder to .txt files: ren *.html *.txt

www.howtogeek.com/111859/how-to-batch-rename-files-in-windows-4-ways-to-rename-multiple-files/

2/6

7/21/13

How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files

This command doesnt offer a lot of power on its own, although it can be integrated into more complex batch scripts.

PowerShell
PowerShell offers much more flexibility for renaming files in a command-line environment. Using PowerShell, you can pipe the output of one command known as a commandlet in PowerShell terms to another command, just like you can on Linux and other UNIX-like systems. The two important commands youll need are Dir, which lists the files in the current directory, and Rename-Item, which renames an item (a file, in this case). Pipe the output of Dir to Rename-Item and youre in business.

After you launch PowerShell, use the cd command to enter the directory containing your files. You should put the files in their own directory so you dont accidentally rename other files.

For example, lets say we dont want the space character in our file names wed rather have an underscore instead.

www.howtogeek.com/111859/how-to-batch-rename-files-in-windows-4-ways-to-rename-multiple-files/

3/6

7/21/13

How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files

The following command lists the files in the current directory and pipes the list to Rename-Item. Rename-Item replaces each space character with an underscore. Dir | Rename-Item NewName { $_.name replace ,_ }

Replace the and _ parts of the command to replace other characters in file names.

Consult Microsofts documentation on the Rename-Item commandlet if you want help performing other, more advanced operations.

Third-Party Utilities
If you need a powerful way to rename multiple files at once without messing with the command line youll want a third-party utility. Jason Fitzpatrick previously wrote about Bulk Rename Utility, his favorite. Bulk Rename Utility has a cluttered-looking interface that exposes the huge amount of options youd normally achieve with regular expressions and complicated command-line options. After installing the tool, navigate to the files you want to rename and select them.

www.howtogeek.com/111859/how-to-batch-rename-files-in-windows-4-ways-to-rename-multiple-files/

4/6

7/21/13

How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files

Change some options in one or more of the panels and youll see a preview of your changes appear in the New Name column. For example, lets say we want to remove everything but the number and just have numbered image files. We can set the Remove panel to remove the first 10 characters and the last 1 character. Click the Rename button to rename the files.

Do you prefer a different batch rename tool? Leave a comment and let us know about it.

Got Feedback? Join the discussion at discuss.howtogeek.com

SHOW ARCHIVED READER COMMENTS (25)


Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+. Published 04/23/12 325,835 Views

RECOMMENDED POSTS
HTG Explains: Why You Need An Antivirus on Windows, No Matter How Careful You Are How To Remove JPG Artifacts and Ugly Image Distortion From Photographs How To Install XBMC On Your iPad How Computer Manufacturers Are Paid to Make Your Laptop Worse How You Can Be Infected via Your Browser and How to Protect Yourself

How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files

www.howtogeek.com/111859/how-to-batch-rename-files-in-windows-4-ways-to-rename-multiple-files/

5/6

7/21/13

How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files

www.howtogeek.com/111859/how-to-batch-rename-files-in-windows-4-ways-to-rename-multiple-files/

6/6

Das könnte Ihnen auch gefallen