Page 2 of 2

Re: encountered improper argument

PostPosted: Mon Feb 15, 2021 11:44 am
by pete515
@Opositive

Many thanks for the information. I was getting this error when I tried to quit BRU and couldn't in fact exit the program (see my post in November). I have circumvented the problem by unchecking the 'Save on Exit' option as you suggested - many thanks again. Can you advise the name of the file where I can try changing the path parameter?

Re: encountered improper argument

PostPosted: Mon Feb 15, 2021 11:54 am
by pete515
Silly me it is bru.ini

I will see what is in there which was causing the issue (it would be nice to save my settings and not have to do everything from scratch when restarting the program)

Re: encountered improper argument

PostPosted: Mon Feb 15, 2021 12:17 pm
by pete515
Don't mean to bomb this thread but for the benefit of others suffering this error I will detail what the issue was in my instance (with many thanks to Opositive)

1. Looked in Bulk Rename Utility and found the following setting...

[Preferences]
Favourite Path="C:\Users\pete\Documents\Bulk Rename Utility\PetesFileNameTemplate.bru"

2. This folder and file did not exist (must have happened during the upgrade from W7 to W10)

3. Created the 'Bulk Rename Utility' folder

4. Created an empty text file in this folder.

5. Renamed it to PetesFileNameTemplate.bru

6. Run BRU and checked the 'Save on Exit' option

7. Exited correctly and new "PetesFileNameTemplate.bru"

8. Restarted BRU and everything loaded from previous session

9. Problem solved

Many, many thanks to Opositive for getting to the root of the problem (which is basically an invalid pathname).

Re: encountered improper argument

PostPosted: Wed Mar 24, 2021 4:23 am
by Bacchus66
Opositive wrote:I believe I've found the genesis of this error.

The problem occurs when "Bulk Rename Here" is used on a network share AND there's a favorites file (.BRU) being loaded that has a directory specified in the Path setting of the General section. Simply clearing this setting from the .BRU eliminates the error.
...


Yes and no. This does prevent the error dialog on startup, but it's not a complete fix to the entire problem on network drives/sub folders, which also included not making the selected folder the current/active on in the directory tree.

BRU still does fails to select the directory when starting from a directory (or selected files within a directory) that is on a network drive, just as happens when the error is spawned. Computer/My Computer/<Whatever you have it named as> is selected, not the directory you right clicked on or in. This is very specific to folders on network drives, as with the error dialog. Right clicking on a folder on any local drive and selecting "Bulk Rename Here" not only lists the files per the most recent filter, it also selects that folder on the directory tree and makes it active.

So there is still something wrong in terms of network drive/directory handling.

Still, removing the error does save two of the three steps the issue was adding to the startup process (ie close error dialog, select any folder, redo right click and "Bulk Rename Here" to select the directory you want.) You still have to do the right click to get the folder you want selected. Yeah, you can navigate to it, but it's usually faster to redo the right click.

Still, it does help so thanks for the info. I've applied it to my various saved files.

A complete fix to the handling of network locations would be great, however.