create folder with part of filename

A swapping-ground for Regular Expression syntax

create folder with part of filename

Postby whitewolf » Tue Nov 22, 2011 12:45 pm

hi every1, i've a little question. i tried to rename some files and automatic create folder with its name ... for example, i've in C:\Folder a file named

Dr House 7x01 E Adesso Ita-Eng 720P Dlmux h264-.mkv

and I want that the final resul is

C:\Folder\Dr House\Stg 7\01 - E Adesso Ita-Eng 720P Dlmux h264-.mkv

for this i've write this regex:
Code: Select all
(.*) ([0-9]+)x([0-9]+-?[0-9]+) (.*)
4 capturing groups:
   group 1: (.*)
   group 2: ([0-9]+)
   group 3: ([0-9]+-?[0-9]+)
   group 4: (.*)

and i run brc64 like this
Code: Select all
brc64 /DIR:. /PATTERN:"*.mkv *.avi *.mp4" /NOFOLDERS /REGEXP:"(.*) ([0-9]+)x([0-9]+-?[0-9]+) (.*)":"\1\Stg \2\\3 - \4" /CLEARR /EXECUTE

but an error happen
Code: Select all
Filename Dr House 7x01 E Adesso Ita-Eng 720P Dlmux h264-.mkv could not be renamed to Dr House\Stg 7\01 - E Adesso Ita-Eng 720P Dlmux h264-.mkv

what's wrong ? thanks so much ...
whitewolf
 
Posts: 1
Joined: Tue Nov 22, 2011 12:36 pm

Re: create folder with part of filename

Postby dele » Sun Dec 04, 2011 3:53 pm

as far as i understand the documentation:
BRU doesn't create new folders/subfolders while renaming a file, thus the filename "Dr House\Stg 7\01 - E Adesso Ita-Eng 720P Dlmux h264-.mkv" is invalid.
dele
 
Posts: 16
Joined: Sun May 22, 2005 12:00 pm

Re: create folder with part of filename

Postby bitmonger » Thu Dec 08, 2011 9:34 am

Please see solution to a similar question in this part of the forum.

http://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=4&t=1502

Bit
bitmonger
 
Posts: 50
Joined: Sat Sep 22, 2007 5:05 am


Return to Regular Expressions