Windows CMD question

Associate
Joined
29 Feb 2008
Posts
1,173
Location
Nottingham
Hi,

I'm trying to rename all file extensions in a folder of sub-folders from m4a to m4b. The "REN" command doesn't seem to work when files are in sub-folders so I was wondering if there is a quicker way than doing it individually for each sub-folder.

Thanks

... and a happy new year to you all :)
 
Thanks for the reply but I can't get it to work. It says the system cannot find the file specified. Any ideas why? I copied and pasted what you put exactly (but with only 1 %) and just changed the directory to the root folder of what I'm wanting to change.
 
Last edited:
paste what you done here

I suspect your path has spaces in which case you must have "c:\path with spaces\" etc etc i.e in quotes


you entered each line individually (i.e. enter at end of each line? )

Ah ok will try that. Suspected as much.


FOR /F %A IN ('dir C:\Users\Ivan\Desktop\Mitchell And Webb\ /b /s /ad /on') DO (
CD /D %A
REN *.m4a *.m4b
)
 
Last edited:
No joy i'm afraid. I tried both and here is what it does:

Untitled.jpg
 
Back
Top Bottom