if that programs creates a new folder each time use this code:
Code: 
@echo OFF
set mydir="%~p0"
SET mydir=%mydir:\=;%

for /F "tokens=* delims=;" %%i IN (%mydir%) DO call :LAST_FOLDER %%i
goto :EOF

:LAST_FOLDER
if "%1"=="" (
    @echo %LAST%
    goto :REN_FILES
)

set LAST=%1
SHIFT

goto :LAST_FOLDER
:REN_FILES
ren *.mp4 %LAST%.*
ren *.wmv %LAST%.*
Lock Down Reviewed by Lock Down on . Batch script help First of all i am 100% noob for batch script... I am using Sabnzbd for downloading from usenet and in that prog i have option to run .bat script after download... Now i need simple .bat script which will rename .wmv or .mp4 file in folder to the same name as download folder... Can anyone help me? Thanks in advance... Rating: 5