How to Batch Rename File Extensions

How to Batch Rename File Extensions thumbnail
Batch renaming files ends up saving you time and effort.

Knowing how to batch rename file extensions lets you change the way multiple files are opened and used without having to alter each file individually. Whether you've got a slew of text files you want to open with a web browser, or a folder of html files you want to make into text files, batch renaming file extensions in both Linux and Windows operating systems is a relatively painless process.

Instructions

  1. Windows

    • 1

      Open Windows Explorer and highlight the folder that contains the files you wish to batch rename.

    • 2

      Click "Start" then "Run" and type "Command" to enter the MS-DOS prompt.

    • 3

      Type "ren *.old *.new" into the MS-DOS prompt where ".old" is the existing file extension and ".new" is the extension to which you wish to change. You should recieve a confirmation message saying the extension have been changed.

    Linux

    • 4

      Select "Main Menu" then "System Tools" to open the Linux terminal. These labels may vary slightly depending on your Linux distribution.

    • 5

      Input "$ ls" to the terminal to display the files and folder inside your current directory. Use the command "$ cd folder" and subsitute "folder" for the name of the directory containing the files you wish to alter.

    • 6

      Type "or old in *.txt; do cp $old `basename $old .txt`.htm; done" and substitute ".txt" with the current file extension and ".htm" with the extension to which you want to change.

    • 7

      Press return to start the code loop and change each specified file extension.

Related Searches:

References

  • Photo Credit Hospital Files image by PinkSony from Fotolia.com

Comments

You May Also Like

Related Ads

Featured