How use same .bru but with dirrefernt drives-paths

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

How use same .bru but with dirrefernt drives-paths

Postby eph612 » Mon Sep 20, 2021 6:02 pm

Hello,

After a few days of searching the forums, I am now a member.

Q: I have multiple drives with many different paths that ALL need the same set of changes made. I have many preset favorites already setup. the problem comes when I load a favorite that has been saved from one drive/path and attempt to use it anywhere else. I load it and it takes me away from the directory and drive I am working and I have go search for the directory/drive again.
I have tried to exclude the path with path="", path=, etc but then the favorite will not load.
Simply said, I wish to use same favorites over multiple drive and folders with the favorite button without having to re find the working directory I was in.

Example:

Saved .bru =
"[General]
Path="h:\files\somefiles\"
[Regular Expressions]
Match=""
Replace=""
Include Extension=0
Simple=0
v2=0
[Filename]
Mode=0
Fixed=""
[Replacements]
Replace="[some garbage]"
With=""

~
When loading this .bru on say drive G: and directory \Newfiles , it fails to keep me in the working directory
of G:\Newfiles and tries to find the path from the .bru.

How can I with little regX experience and no programming experience solve this?

I enjoy the program for small things but with this lockdown nonsense have found time to archive and straighten up 20 years of data to new larger 6-8TB drives. It does a fine job but this has me stumped.

Appreciate the help!
eph612
 
Posts: 3
Joined: Mon Sep 20, 2021 5:39 pm

Re: How use same .bru but with dirrefernt drives-paths

Postby eph612 » Mon Sep 20, 2021 6:05 pm

Also a quick question. I posted this and was made to relogin in, maybe timed out as my post was a a few mins to type. I cannot see a edit button. No worries on this but wanted to clean the post up a bit.

Ty
eph612
 
Posts: 3
Joined: Mon Sep 20, 2021 5:39 pm

Re: How use same .bru but with dirrefernt drives-paths

Postby Luuk » Mon Sep 20, 2021 9:29 pm

Its unfortunate, but the .bru-files only support having one saved-path, I did conduct many experiments like adding...
Path="C:\SomeFavoritePath"
Path="D:\AnotherFavoritePath"
Path2="F:\AnotherFavoritePath2"
Path3="F:\AnotherFavoritePath3"

But the bru.exe would only conduct the very first path, and so forbids all of the other folder-paths.
Im thinking it could be a good enhancement, if many users like to conduct many different folder-paths?
So really, the only way Im seeing to conduct like this, is dragging the different folders into the file-listing?

If you like to forbid switching folder-paths when you open another .bru-file...
Inside of the .ini-file, you can change a line to look like...
Store Favourite Pathnames=0
Luuk
 
Posts: 691
Joined: Fri Feb 21, 2020 10:58 pm

Re: How use same .bru but with dirrefernt drives-paths

Postby Admin » Tue Sep 21, 2021 12:42 am

Hi,
if you do not save the path in the profile, so you do not have this in the BRU file:

"[General]
Path="h:\files\somefiles\"

Then the BRU file should open and stay in the current path?

The option is in :
Menu -> File -> Favourite -> Store Pathname
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Re: How use same .bru but with dirrefernt drives-paths

Postby eph612 » Tue Oct 26, 2021 9:31 pm

Hello guys,

I am very happy to see the Admin respond..that show a lot concerning the effort to make this a great product. I do indeed love it. After leaving robocopy alone, to much regx for me, this is just fantastic! Apologies for not getting back. I lost my password moving to another PC.

This works fine now that I understand its limit. I tried the drag and drop idea and it failed. Let me explain please.

A dir of folders and file. ALL of them have one or more of the following tags and garbage attached to the folders and file names.

Exs:

1:filename."downloaded from" < this can be in many forms and need to be removed

2:filename.extension".more garbage" <<that is sometime same other times is not.

My solution was to make each .bru for each. this takes forever to load and execute each one. each having its own 3-4 steps

So my question is, can I do this in one fell swoop as it were. Load all the .brus for a current folder with all its sub folders opened and tell it to remove more than one thing at a time. I see the collision detection routine is present. and understand it logic.
For now I load a project and its folders. hit open and navigate to the file to fix say 3 out of 100, execute it and refresh and reload. repeat over and over.

I wouldnt even mind to take 3 or 4 runs at a large dir to make corrections if one would cause file errors of a file being renamed then tried to rename again before it is loaded into the current jobs memory allocation.

most of the files are from ftp locations and have a .funet etc.. and some have it in brackets or similar. I have been deleting the .funet, execute then going back and doing the "double quote" after.

If I can get this simple procedure to work in one or two clicks, you have a customer for life! Surely it is simple and I dont understand the power of regx enough to be able to use it.

also, are there any templates on site I can download and work with experiment. I can see how each will work and adjust it, I hope to my jobs.

Deeply appreciate the help guys. If I can assist in anyways on site or whatever, just ask. I have a bit of spare time with all the bug stuff being floated around now.

Cheers,

Eph612
eph612
 
Posts: 3
Joined: Mon Sep 20, 2021 5:39 pm

Re: How use same .bru but with dirrefernt drives-paths

Postby Luuk » Wed Oct 27, 2021 7:43 am

We must first need to know exactly which text does need to be removed? but Im guessing it should be very easy for only one step.
First to put checkmarks inside for "Renaming Options, File/Folder Extensions, Rename File Extension and Rename Folder Extension".
Then with RegEx(1) to put a checkmark inside "v2" so then using a "Match" and "Replace" something like...

(\.)downloaded from/g(?X)(.)[[(]*\.funet[])]*/g(?X)(\.([^.]{3,4}))\.([^.]{5,}|\2)$
$1

Everything inside of Filters(12) should be completed ahead of time, before dragging anything into the file-listing!
Im always first put a counterfeit-drive like X:\ inside for the top path, and then press enter, before my dragging.
The Filters(12) should have checkmarks inside of... Folders, Files, and Subfolders.

Then when dragging any folder, everything below it, that Filters(12) does match, will present inside of the file-listing.
Also the Filters(12) could use a checkmark inside "RegEx" so then using a "Mask" like...
(\.downloaded from|\.funet|(\.([^.]{3,4}))\.([^.]{5,}|\2)$)

The RegEx(1) destroys [.funet] and (.funet) but you can add more bordering-characters inside of the red-parts for the "Match".
I dont know what means "etc" but if there can be more words like .funet to be destroyed, you can just change that part like...
funet ===> (funet|word2|word3)

After inventing it complete, the .bru can save almost everything, except for which folders is getting conducted by dragging them.
This link does have some regex descriptions and also some other links... http://www.bulkrenameutility.co.uk/foru ... p?f=3&t=96
The "How-To" does also have two operation manuals with very many examples, the VOL II does have much more of the regex.
Luuk
 
Posts: 691
Joined: Fri Feb 21, 2020 10:58 pm

Re: How use same .bru but with dirrefernt drives-paths

Postby eph612-2 » Sat Oct 30, 2021 10:58 pm

Luke,
Thank you very much. I will try and wrap my head around this. If I can just under stand how to do a single file, yes then I can test on a dir. Most of the files are huge .ISO of older OS/linux and takes forever to ftp them. The rest not so bad so no mistakes is to large to learn from. :>

I had to change to a new user as the old pass word failed and the email sent me a **** is your new password 4 times in a row. So Since **** does not work, I gave up and made a new one :>

From what I read, I will have a file made up and ready to go before loading a directory and hitting submit/rename. You are correct in most of the files "edits" being at the end. some do have then garbage in the middle before a standard came to be.
I will work on the .bru amd aybe post it in case others would be usful to read how. Am sure I am not the only one doing this. So many things to read here I really got lost after a couple hours of squinting. Appreciate the links to the "howto". I eve went as far as to download a short course on regx as it seems its going to be needed in near future.
Quick last question, I am seing that am stacking commands into a line. Does this need to be done in an order? How will this be used on the subfolders if so. I assume do the folder then hit the "subfolders" button and run it again?

Do some testing and pull hair and post my mistakes or come back with a yehaa for you if all or most goes well. either way.. TYVM for your time. appreciate it!
eph612-2
 
Posts: 2
Joined: Sat Oct 30, 2021 10:46 pm

Re: How use same .bru but with dirrefernt drives-paths

Postby Luuk » Sun Oct 31, 2021 5:42 am

Im just guessing with the RegEx(1) because not seeing all of the names, and what should be the new names?
If you like to give a list of more names and saying what should be the new names, it can much be improved.
When the RegEx(1) has a 'v2' checkmark, this grants saying many different expressions inbetween (?X) like...

Match1/g(?X)Match2/g(?X)Match3/g(?X)...
Replace1(?X)Replace2(?X)Replace3(?X)...

The /g is not needed, but says 'global' to replace all matches inside of a name, instead of just one of them.
They do conduct in the 1-2-3 order, but with the matches already posted, it should not matter to change the order.
But its always good thinking about the order, because sometimes your Match/Replace1 can forbid your Match/Replace2.

When all matches will get replaced by Group1, then its ok just saying $1 for the replace, instead of saying $1(?X)$1(?X)$1.
I did originally add (.) in front of the below .funet-matcher, just so I could use $1 for Replace, but should have done it like...

(\.)downloaded from/g(?X)[[(]*\.funet[])]*/g(?X)(\.([^.]{3,4}))\.([^.]{5,}|\2)$
$1(?X)(?X)$1

Match/Replace1: .downloaded from url ===> . url
Match/Replace2: .funet ================> (removed along with any bordering-chars, since nothing inside of Replace2)
Match/Replace3: .ext.ExtraText =========> .ext (when ExtraText is 5-or-more non-periods, or the same repeating ext)

========================================================================================================

Everything inside of Filters(12) should be completed ahead of time, before dragging anything into the file-listing.
After dragging, if you change anything inside of Filters(12), your list disappears and they must be dragged again!
So first, to put the checkmarks inside for Files, Folders, Subfolders, and maybe also a 'Mask' if its decided?

The bru should not present any problems renaming them all at the same time, even with many subfolders at different depths.
This because the bru starts renaming at the very deepest subfolders first, even if you are selecting a different rename-order.
But I would still not rename anything, until Im first getting the RegEx(1) complete to rename everything like Im wanting.

If other applications like Windows File Explorer, does have any of the files or folders open, this can prevent the renames.
So if another application can have one of the folders open, then the bru will probably not rename it, or anything below it.
Luuk
 
Posts: 691
Joined: Fri Feb 21, 2020 10:58 pm


Return to BRU Support


cron