Rename file ext in many sub-dir using a .BAT

Microsoft Windows xp professional editio...
October 15, 2009 at 12:26:15
Specs: Windows XP
How can I rename file extension for files within many subdirectories.

Using the following basic command I can rename file extensions for all files in the same directory:

ren *.mp3 *.adp

But how do I change all files within subdirectories of C:\WINDOWS\Music\Misc?

I greatly appreciate all of your time and efforts, thank you.


See More: Rename file ext in many sub-dir using a .BAT

Report •


#1
October 15, 2009 at 14:23:21
@echo off
for /R C:\Windows\Music\Misc %%j in (.) do (
  if exist "%%j\*.mp3" ren *.mp3 *.adp
)


Report •

#2
October 15, 2009 at 15:48:40
Unfortunately this did not do anything to the files within all the subdirectories of \Misc.

Yes, I saved the .BAT file as "all files".

I appreciate your help though, thank you.


Report •

#3
October 16, 2009 at 02:23:01

Sorry there was a little mistake in the code I posted, replace with

@echo off
for /R C:\Windows\Music\Misc %%j in (.) do (
  if exist "%%j\*.mp3" ren "%%j\*.mp3" "*.adp"
)
 


Report •

Related Solutions

#4
October 16, 2009 at 10:25:51
Perfect that did the job. I am deeply thankful, much apprdciated.

Report •


Ask Question