HyperGaming Network

Other Forums => Development => Old Forum Boards => Scrapyard => Coding => Topic started by: Silver Knight on 18-08-2011

Title: Batch Files: Let's rename a extension
Post by: Silver Knight on 18-08-2011
This tutorial will teach you how to mass-rename every file's extension (.mdl, .jpg etc) to a different extension.


First of all you need to create a batch file, it's simply done by opening up notepad and saving the file as FILENAME.bat It will then be a batch file.



>The Syntax:

ren *.(current extension name) *.(extension you want)
Since I want to change the extension from .jpg to .png, in my case the command line would be:
ren *.jpg *.png
(https://forums.hypergamer.net/proxy.php?request=http%3A%2F%2Fcloud.addictivetips.com%2Fwp-content%2Fuploads%2F2008%2F12%2Fchangeextension-thumb.png&hash=4ca4f8e8a43653a8d622150d25f7e1b8d3f9570a)



This works for any type of extension renaming and will rename every file in the allocated folder which meets it's criteria to what you have specified.


If you want the command prompt to stay open after it's finished, you can always add in "Pause" so it will not instantly close.