# Batch renaming files in multiple folders using DOS



## dharani84 (May 14, 2012)

Hello. I am trying to rename a bunch of files inside multiple folders at the same. For example, I have 3 folders, X,Y and Z. The files inside the folders are X.gps,X.txt, Y.gps,Y.txt,Z.gps and Z.txt, in the respective folders. I am looking for a command that will traverse through the three folders and rename the .gps and .txt files in the folders with a specific name (X.gps with M.gps, Y.gps with T.gps, etc). I had a batch file with rename commands for all the files in all folders, but it only changed the files in the first folder? Thanks for your help.


----------

