Input a specific file, and /PATTERN problem

Post any Bulk Rename Command support requirements here. Open to all registered users.

Input a specific file, and /PATTERN problem

Postby testusetom » Mon Sep 12, 2016 5:21 am

Hi,

I'm wondering if there is a certain way to only input only a certain file, specifically to be used in a for loop. Currently the parameters are all folder based customization, and there really isn't any for inputting a specific file (at least, I cant find any in the documentary). I need the ability to manipulate only 1 file to achieve a certain workflow. What I want to achieve is something like (the <<< >>> represents my made up function i need)
Code: Select all
[BUNCH OF WORKFLOW CODE...]
for %%G in (*.abc) do (
brc64 <<</INPUT:%%G>>> /REGEXP:"^(.*?])([^][()]*)(.*)$":"\2" /TRIM
)
[MORE WORKFLOW CODE...]
pause


After reading a bit, I found a kinda temporary solution that allows me to work within the directory, but doesn't allow me to input files from anywhere, the /PATTERN:<> code. However, this parameter doesn't really work the way I want. To elaborate, I have a directory with 2 files:
Code: Select all
[abc]abc-00(a1b2c3)[abc123].txt
[abc] abc - 00 (a1b2c3)[abc123].txt


And by running this example code
Code: Select all
for %%G in (*.txt) do (
brc64 /pattern:"%%G" /REGEXP:"^(.*?])([^][()]*)(.*)$":"\2" /TRIM
)
pause

I get:
Code: Select all
C:\Users\a\Desktop\Tools & Programs\Bulk Rename Utility\BRC_Unicode_64>for %G in (*.txt) do (brc64 /pattern:"%G" /REGEXP:"^(.*?])([^][()]*)(.*)$":"\2" /TRIM )

C:\Users\a\Desktop\Tools & Programs\Bulk Rename Utility\BRC_Unicode_64>(brc64 /pattern:"[abc] abc - 00 (a1b2c3)[abc123].txt" /REGEXP:"^(.*?])([^][()]*)(.*)$":"\2" /TRIM )


Processing Folder C:\Users\a\Desktop\Tools & Programs\Bulk Rename Utility\BRC_Unicode_64\

C:\Users\a\Desktop\Tools & Programs\Bulk Rename Utility\BRC_Unicode_64>(brc64 /pattern:"[abc]abc-00(a1b2c3)[abc123].txt" /REGEXP:"^(.*?])([^][()]*)(.*)$":"\2" /TRIM )


Processing Folder C:\Users\a\Desktop\Tools & Programs\Bulk Rename Utility\BRC_Unicode_64\
Filename [abc]abc-00(a1b2c3)[abc123].txt would be renamed to abc-00.txt

C:\Users\a\Desktop\Tools & Programs\Bulk Rename Utility\BRC_Unicode_64>pause
Press any key to continue . . .


As you can see, the file with spaces in it is ignored and not processed, while the one without spaces is process. This shows the /PATTERN:<> only recognized patterns without spaces, thus making it useless for the type of workflow I need.

To sum up, I'm not quite sure what to do. Did I miss any parameters that might be useful, or is there a solution to the type of workflow I need?

Note: the /execute command is not used in any of the examples
testusetom
 
Posts: 5
Joined: Fri Sep 02, 2016 3:56 pm

Return to BRC Support