Change Case Of File Extensions | DOS Batch Command

  • Create a batch file using any editor. <filename.bat>
  • Copy paste following commands depending upon – whether to change case of only the files in this folder or the child folders as well.
  • Each line is for a specific file type; may add other extensions as per your requirement.
  • Save the file and double click to run in the desired folder.

Change file extension to lower case – for files in this folder only

REN *.PNG *.png
REN *.JPG *.jpg

# Rename JPG/PNG files extension (may add other depending upon your requirement)

Change file extension to lower case – for files in this folder and all the child folders as well

FOR /R %%G IN (.JPG) DO REN “%%G” “%%~nG.jpg”
FOR /R %%G IN (.PNG) DO REN “%%G” “%%~nG.png”

# Rename JPG/PNG files extension (may add other depending upon your requirement)

Leave a Reply

Your email address will not be published. Required fields are marked *