EXAMPLE:
D:\TV\New Shows\Supernatural.s05e05.xvid\Supernatural.s05e05.xvid.avi to
D:\TV\New Shows\Supernatural.s05e05.xvid.avi
The reason for this is I use another program that monitors that folder for new shows and moves them into their series/season folders and gathers all available metadata for them. The problem is, if the show resides in a subfolder, the program thinks it is a new "series" and doesn't move it. So I use a post processing script that looks like this:
Code: Select all
@echo off
cd /D "%1"
ren *.avi %1.avi
move *.avi ..
cd ..
rd /S /Q %1
So what I want, is something extra in the script, possibly a "IF" parameter? That checks to see if the parent directory is "New Shows" and if so, to not move the file and exit the script, but if the directory is not new shows, to complete the script.
I've tried adding
Code: Select all
@echo off
cd /D "%1"
IF %1 == New Shows (exit) Else (
ren *.avi %1.avi
move *.avi ..
cd ..
rd /S /Q %1)