Scripting help required to move file up one level
Posted: April 30th, 2010, 12:59 pm
Hi There, i currently use the script below to convert my tv episodes to ipod format.
Ive been having a problem where all files in the show directory are all converted every single time, so i decided to have sab create a temp directory when it downloads the show . for example
convert being the temp folder. everything works well and the conversion takes place. the problem is the episode stays in the convert folder and i would like to move it up one level to to
i tried doing this in my scipt with move but this moves the file up one level in the current directory that dos is in which is on the local machine. as you can see above i want to move the file up one level on the network and i cant set a network address as the current directory in dos. One thing i thought of was to somehow take out the out of the directory name and tell the file to move there but i dont know how to do that.....
here is my current script anyway, i appreciate any help any one can give me.... thankyou.
Ive been having a problem where all files in the show directory are all converted every single time, so i decided to have sab create a temp directory when it downloads the show . for example
Code: Select all
\\nas\tv\show name\season1\convert\
Code: Select all
\\shinenas\tv\show name\season1\
Code: Select all
"%dirname%\*.mkv ..\
Code: Select all
\convert
here is my current script anyway, i appreciate any help any one can give me.... thankyou.
Code: Select all
set name=%3
set name=%name:"=%
REM rename isos or bins
set dirname=%1
set dirname=%dirname:"=%
set name=%3
set name=%name:"=%
set dirname=%1
set dirname=%dirname:"=%
for /R "%dirname%" %%f in (*.mkv) do e:\handbrake\HandBrakeCLI.exe --input "%%f" --output "\\Shinenas\tv\Ipod\%name%.mp4" --preset="iPhone & iPod Touch"
for /R "%dirname%" %%f in (*.avi) do e:\handbrake\HandBrakeCLI.exe --input "%%f" --output "\\Shinenas\tv\Ipod\%name%.mp4" --preset="iPhone & iPod Touch"
for /R "%dirname%" %%f in (*.mov) do e:\handbrake\HandBrakeCLI.exe --input "%%f" --output "\\Shinenas\tv\Ipod\%name%.mp4" --preset="iPhone & iPod Touch"
move *.avi ..\
move *.mkv ..\
move *.mpg ..\
move *.mp4 ..\
move "%dirname%\*.mov