by truth » Sat Oct 26, 2013 11:26 am
Note everything below assumes you've renamed files AND folders per original regex!
It stripped the xyz-section & uppercased, but BRU wont create NewDirs, only rename them
I use BRC within batches in such cases, not used to solving this graphically
Since I missed it the 1st time, I'll give this DirPath my best shot... (it's ugly, but it works)
You can use BRU to create the batch commands to automate this:
Again, the below assumes you've already renamed Dirs and Filenames per original regex!
#12SubFolder & Folders (Files=Unchecked)
#1Regex below:
(.+?) - S([0-9]+)E([0-9]+).*$
MD "\1\Series \2" & MOVE /Y "\1 - S\2E\3\*" "\1\Series \2\"
In the left-pane, select Drama
In right-pane, select SubDirs named as Show - S##E##
BRU will create the batch-commands for your desired DirPaths under NewName column
Right-click your selected SubDirs / ClipboardCopy / NewFileName
Paste the batch-commands into a text file, the batch-lines will appear as:
MD "Show Name\Series 01" & MOVE /Y "Show Name\Show Name - S01E01\*" "Show Name\Series 01\"
I added the extra digit(s) in Series # to allow for 2-digit #s (easy to change if your max is only 9)
So long as theres no mis-named or identically-named files... You should be fine with MOVE vs COPY
By matching DirNameChars, it moves files as follows:
Drama\Show1 - S01E01\* ---> Drama\Show1\Series 01\
Drama\Show1 - S01E99\* ---> Drama\Show1\Series 01\
Drama\Show1 - S04E01\* ---> Drama\Show1\Series 04\
Drama\Show1 - S12E01\* ---> Drama\Show1\Series 12\
Drama\Show2 - S04E01\* ---> Drama\Show2\Series 04\
Drama\Show3 - S08E01\* ---> Drama\Show3\Series 08\
Save the text in a .bat/.cmd extension & run it within Drama as CurrentDirectory
I omitted commands to delete empty Dirs afterwards, figured you'd use COPY anyway to preview results
When you're ready, you can add below batchline to delete empty-Dirs (Dirs with 0-byte files are left intact):
FOR /F "usebackq delims=" %%d in (`"dir /ad/b/s | sort /R"`) do rd "%%d"
The prob with this method is you have to do it once for each \MainDir beneath TV!
Its still a good example of letting BRU create specialized commands based on Dir/Filename-matching
If I can think of something more elegant, I'll post back.