making a batch file to rename the m4a to .m4a

January 3, 2013 at 16:05:11
Specs: Windows 64
hi all

I'm trying to rename a lot of files because i got a lot of music that i got off my old mac that doesn't work anymore an a few iPods so i used iTunes to do this with but here is the problem iTunes rename all the files to shortym4a but it needs to be shorty.m4a for it all to work so i need to make a batch file or some kind of script that would change over 23,000 songs


See More: making a batch file to rename the m4a to .m4a

Report •


#1
January 3, 2013 at 18:21:04
maybe (if they're all 8-byte names:
ren ?????m4a ?????.m4a

If not, you'll need a loop or some other procedure:
ren ?m4a ?.m4a
ren ??m4a ??.m4a
ren ???m4a ???.m4a
ren ????m4a ????.m4a
ren ?????m4a ?????.m4a


Report •

#2
January 3, 2013 at 22:35:15
put all this into an bat file?

ren ?m4a ?.m4a
ren ??m4a ??.m4a
ren ???m4a ???.m4a
ren ????m4a ????.m4a
ren ?????m4a ?????.m4a


Report •

#3
January 4, 2013 at 05:24:13
Better script:
for /r %%a in (*m4a) do call :doRen "%%~Fa"
goto :eof
:doRen
set fileName=%~n1
ren %1 "%fileName:m4a=%.m4a"

How To Ask Questions The Smart Way


Report •

Related Solutions

#4
January 4, 2013 at 18:31:06
Yes, either of these scripts should work as a batchscript. You can cut/paste straight from the forum (to notepad or clipbrd.exe) then save as something.BAT

(or: ren %1 %filename:~0,-3%.m4a will also serve in Razor's )
ps: ah! touche'


Report •

#5
January 5, 2013 at 05:54:05
nbrane: (or: ren %1 %filename:~0,-3%.m4a will also serve in Razor's )
Not so much. My version will grab files ending in "m4a" as well as files ending in ".m4a"

How To Ask Questions The Smart Way


Report •

#6
January 6, 2013 at 12:21:51
thank you all so much im going to try this

Report •


Ask Question