hi everyone!
what is the bat scripts for Renaming filenames 'Extensions' EVEN in SubFolders..
in reference to its filenames... like for example,
c:\old files\pictures\album01\filenames01.bMp
c:\old files\pictures\album01\filenames02.BmP
TO
c:\old files\pictures\album01\filenames01.BMP
c:\old files\pictures\album01\filenames02.bmp
the main objective is to rename all the extension to uppercase in respect with its filename01 & filename02 to extension in lowercases!!
But have to be able to Run through even in Sub-folders too..
like the scripts destination can just set to c:\old files\
instead of the long full path c:\old files\pictures\album01\
thanks!!
rename filenames 'Extensions' EVEN in SubFolders
Moderator: DosItHelp
Re: rename filenames 'Extensions' EVEN in SubFolders
Code: Select all
@echo off
for /f "delims=" %%f in ('dir /s /b /a-d "c:\old files"') do (
if /i "%%~xf"==".bmp" ren "%%~dpnf.bmp" "%%~nf.BMP"
)
-
- Expert
- Posts: 391
- Joined: 19 Mar 2009 08:47
- Location: Iowa
Re: rename filenames 'Extensions' EVEN in SubFolders
*untested* probably a bit more efficient:
Code: Select all
for /f "delims=" %%f in ('dir /s /b /a-d "c:\old files\*.bmp"') do ren "%%f" "%%~nf.BMP"