0

I'm looking for a tool for batch rename in windows with the following features:

  • number files and folders
  • shorten long file names, rename file extensions
  • supports metadata such as Exif, IPTC, and ID3
  • organize, sort, and rename files automatically
1

Every your required feature would be separate question. So, you should use batch and adjust it before every run. I use, for example:

@echo off
setlocal EnableDelayedExpansion
for /f "tokens=*" %%f in ('dir /b *.mkv ^| sort') do (
    SET var=%%f
    rem move "%%f" "1!var:~3!"
    rem mklink /h "2%%f" "%%f"
    rem if  "!var:~7,1!" == "_" move %%f "!var:~0,6!0!var:~6!"
    rem move "%%f" "3!var:~0,2! !var:~4!"
...
    # rename file extension (in my case .vob.mkv --> mkv)
    rem echo "!var:~0,-8!"
    rem move "%%f" "!var:~0,-8!".mkv
)
Pause>nul
exit /b

And more complex batch:

# rename files and then use (dvd tracks) list. 
@echo off
set "File2Read=mkv.txt"
If Not Exist "%File2Read%" (Goto :Error)

rem iterpiame 0
setlocal EnableDelayedExpansion
for /f "tokens=*" %%f in ('dir /b *.mkv ^| sort') do (
    SET var=%%f
    if  "!var:~7,1!" == "_" move %%f "!var:~0,6!0!var:~6!"
)

setlocal EnableExtensions EnableDelayedExpansion
for /f "delims=" %%a in ('Type "%File2Read%"') do (
    set /a count+=1
    set "Line[!count!]=%%a"
)

for /f "tokens=*" %%f in ('dir /b *.mkv ^| sort') do (
    set /a num+=1
    set "Out[!num!]=%%f"
)

if %count% neq %num% (Goto :Error)

for /l %%n in (1 1 %num%) do (
    echo mklink /h "!Line[%%n]!".mkv "!Out[%%n]!" 
    mklink /h "!Line[%%n]!".mkv "!Out[%%n]!" 
)

endlocal

rem # end #
pause>nul
Exit
For /L %%i in (1,1,%Count%) do (
     echo "Var%%i" is assigned to ==^> "!Line[%%i]!"
)

:Error
cls & Color 4C
echo(
echo   Error "%File2Read%" count=%count% num=%num% 
Pause>nul
exit /b

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy