encountered improper argument

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

encountered improper argument

Postby ssamorez » Sat Nov 14, 2009 11:56 pm

I am able to install w/win7pro...had to manually add to SEND TO..., but when BRU loads, I get this error: encountered improper argument. When this error message occurs BRU will not list individual files in the work window! If I run BRU as an executable, it works OK.
ssamorez
 
Posts: 2
Joined: Sat Nov 14, 2009 11:47 pm

Re: encountered improper argument

Postby RogerO » Sat Oct 03, 2020 3:29 am

I would like to add my 2 cents to this error condition.

A week or two ago when attempting to execute the previous version of BRU (meaning what I had on my system = 3.0.0.1), and with a clean and first time display of the main window - I attempted to quit BRU immediately by various methods and they all gave me a small window showing the words "Encountered improper argument". This was constant.

I looked for a newer version and gladly found 3.4.0.0. So I downloaded, installed and executed it and it exited fine using the same various methods. Over and over again. I thought the problem was gone in this new version.

So now after a couple of days and executing it several time, I have just experienced this problem again. I wasn't going to bring it up now but it has still got a problem somewhere.

But the problem is slightly different than with ver 3.0.0.1. This time using 3.4.1.0 the error window popped up the first time the main window displayed. If I attempted to exit the result would be another message window that showed a larger amount of exit, but it boiled down to "The program is expecting input from me" and so I could not exit. I finally noticed a button saying something like "To exit - Press OK" so I did and it went away.

I executed this program under both Win7 and Win8 - Win8 on a Laptop did not give this problem trying to exit - Win7 on a Desktop is showing this problem on exit, but not every time. So I guess we can put it on the back burner until I can back this up with more solid results. I will come back here if there is newer information.
RogerO
 
Posts: 5
Joined: Wed Sep 30, 2020 10:04 am

Re: encountered improper argument

Postby Bacchus66 » Sat Oct 17, 2020 10:55 pm

I just started countering this issue. This started happening just a couple of weeks ago, either just before or just after I upgraded to 3.4.1 (directly from 3.3.2.1) on the 6th or 7th of October. two weeks ago. It's been a couple of weeks, so I'm not 100% sure of the sequence. Either I started having the issue and checked for an update, or I did the update and started having the issue. I assumed it was a session thing and really didn't pay much attention to details since other then the annoying extra step of re-selecting the starting point it doesn't seem to affect actual operation. Still, it's annoying. Especially the loss of the ability to pre-select certain files.

For me it is specific to launching Bulk Rename Utility via the Windows Explorer extension. Whether I am doing that with a folder selected, or with one or more individual files selected, I get the same "Encountered improper argument" dialog on startup. I tested, and If I start BRU from it's shortcut (which I normally would never do), the application launches fine. It's only when i launch via the explore extension (ie right click .. bulk rename here) that the issue occurs.

I have done a LOT of bulk renames over the last several months, both by selecting a folder as a staring point, and by selecting a specific set of files within a folder, and would have noticed it long before if it wasn't a very new issue. Prior to a couple of weeks ago this always worked fine, and now it doesn't.

As noted, not critical, just annoying do to the slight loss of functionality and additional overhead involved in ignoring the error and selecting the dir to search again.

Thanks in advance for any info.
Peter S
Bacchus66
 
Posts: 13
Joined: Sat Jun 27, 2020 1:02 am

Re: encountered improper argument

Postby Admin » Sun Oct 18, 2020 5:41 am

Thanks for the report, does this happen on a specific set of files or a specific folder? Is it reproducible, i.e. if it happens once and you reselect the same files/folder does it happen again and every time? thanks
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Re: encountered improper argument

Postby therube » Mon Oct 19, 2020 9:01 pm

it is specific to launching Bulk Rename Utility via the Windows Explorer extension

In order for that to work, something has to be set up in the Windows Registry.
Would be interesting to know if that is (still) set as expected (something like; Bulk Rename Utility.exe "%L", or whatever it may be).
Or if perhaps some "windows manager" utility or similar might be interfering?

(Nirsoft's) OpenWithView should provide a quick method to get that.)
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: encountered improper argument

Postby Bacchus66 » Sun Nov 01, 2020 3:19 am

Admin wrote:Thanks for the report, does this happen on a specific set of files or a specific folder? Is it reproducible, i.e. if it happens once and you reselect the same files/folder does it happen again and every time? thanks


Yes, it happens every time on the same drive, folder or set of files. However, as noted it is specific to startup. Once the app is running, right clicking on a folder or a set of files does correctly switch to that folder, and if files are selected, does select those files. Assuming of course the current filter allows the viewing of those files. All as normal.

However, I did just discover that for me at least the startup bug only occurs with network drives. Most of my bulk renames are done on one or another mapped network drives that point to shares setup on my NAS. However I happen to have to do some renames of MP3 files to remove all accented characters form filenames (short reason - iTunes is stupid). The primary location for those is my local CPU, so I went to rename there by right-clicking and choosing bulk rename here. At first it didn't really catch my attention, but then I noted that I didn't recall the "Encountered improper argument" dialog. I closed and tested it a few times, both on my MP3 folder, and on several others on my primary documents and media drives on my CPU. In all cases it worked fine.

I then re-tested on multiple folders in my network drives, and got the error every time on startup, but not if the app was running. Also, to be clear, the mapping is irrelevant. I tried it on both mapped drives and directly by browsing to them from Network. Both methods spawned the dialog.

So the issue is consistent to startup only, and only if the folder or files are on a networked drive. At least for me.

I did note one additional point of info though,when one folder I used for testing happened to have a large number of files (over 5700). The "Encountered improper argument" dialog shows only after all files that match the current criteria set are found. There was the normal 5-10 sec pause for that many files to be searched before the dialog showed up. I'm not 100% sure if the dialog showed up immediately before or after the file list started displaying, since that happens essentially concurrently. I think the file display had at least started updating before the dialog appeared however. Either way, the actual search was clearly complete at the point the dialog was generated.

Hope that helps track down the issue. Let me know if you need any other info or any testing done.

Thanks,
Peter S
Bacchus66
 
Posts: 13
Joined: Sat Jun 27, 2020 1:02 am

Re: encountered improper argument

Postby pete515 » Sun Nov 08, 2020 1:45 pm

For various reasons I've had to reinstall BRU - was running on W7 now running on W10. I get this error message when I try to Exit the program and the program doesn't then Exit - have to kill the program using Task Manager. Was OK on W7 before the reinstall.
pete515
 
Posts: 4
Joined: Sun Jun 16, 2019 11:42 am

Re: encountered improper argument

Postby RogerO » Mon Nov 09, 2020 11:07 pm

Added Information.... I'm on my laptop Win 8.1....

To start with - now I'm having a different take on the condition. It seems that I'm having the problem on my laptop win 8.1 nearly all the time rather than on the Desktop Win 7. I'm not sure of that first post of mine which was the opposite situation. I haven't seen the error condition on my Desktop lately whereas I nearly always see it on this laptop Win 8.1. OOPS if appropriate!

I THINK I FOUND IT! A condition where the ERROR pops up repeatedly and re-creatable. The condition I have seen is where the error pops up is only after a situation is staged for the next execution of BRU! That's why it's been so hard to see - for me at least!. Here is the layout....

1) Execute BRU on a local file of the current computer. Make sure this is not the second execution of BRU when you were previously on a NETWORK file (on some other computer - this is crucial). I was executing BRU on files of the current computer without a problem.

2) Cancel the current execution of BRU. Should NOT be any problem with regard to error we are testing for. I can get in and out of BRU repeatedly if I stay in local files.

3) Execute BRU and use \\nas (what I did) to establish the NETWORK file list condition. Connect BRU to one of those files. Does not require any changes to be made to any data of those files. Now EXIT - Simply know that this is a crucial moment in that BRU was currently in a NETWORK file when Exited.

4) >>>> This is the moment... Execute BRU and when it pops up, the error will be presented too! You will probably have to use Task Manager to quit BRU. Know that if you stay in local files as in 2), the problem will not show up - and it is on the NEXT execution of BRU that the error condition pops up, if it is going to.

5) Now proved it's this situation of ever being in a NETWORK file by doing this.... Execute BRU and get into a NETWORK file again (as in 3), BUT before quitting BRU simply connect to a local file (even if the network files are still showing in the file list). The next BRU should not show the error problem!

6) Try going back and forth in various ways to local files and Network files (leaving the Network files on the list or removing them before exiting) to narrow down the circumstances. How many ways should I elaborate on this matter.

DID I make the conditions clear and repeatable?

I hope that someone can try my experiment and prove the hypothesis. I think that I have been able to show the repeatability of the "argument error".

Have fun with it, if possible.
RogerO
 
Posts: 5
Joined: Wed Sep 30, 2020 10:04 am

Re: encountered improper argument

Postby RogerO » Tue Nov 10, 2020 4:47 am

WELL I GOOFED in the last assessment.

I said above the I was apparently wrong in saying that I was NOT having much trouble with the ARGUMENT error dialog in my Desktop Win 7 computer.... Wrong again! I just attempted to execute the BRU 3.4.1.0 program on a clean environment of the Desktop Win 7 computer and I immediately got the "... argument..." error issue on this computer. I haven't re-booted this computer for a while and I don't believe I have previously been into a NETWORK file on this computer for some time. When I started the BRU program I got the error right away!

So now I don't exactly know how the problem I described while on the laptop Win 8.1 computer relates to the execution on this Desktop computer.

We will see.... I'm very sure of the results I was getting before and describing from the Laptop Win 8.1 computer above, but I don't know of the ramifications and relationship to the scenario as played out on the Desktop Win 7 computer against the NETWORK files. I will test and explain tomorrow.
RogerO
 
Posts: 5
Joined: Wed Sep 30, 2020 10:04 am

Re: encountered improper argument

Postby Bacchus66 » Tue Nov 10, 2020 5:56 am

Some more info:

I just noticed/discovered when I start BRU BRU by right clicking and choosing "Bulk rename here", then all the files in that directory that match the most recent search filter do show up in the file list on startup (along with the error of course). So at least it's getting the correct directory info. However, even if I have selected a subset of the files in that directory in explorer before starting bulk rename, none are actually selected.

However until I actually select a directory in the file tree on the left, The "improper argument" error shows up every time I click refresh on the search. It only stops appearing once I select a directory/drive from the tree on the left.

So though the correct directory is passed from explorer, I still end up having to browse to that directory in BRU.

As noted in my prior post, once BRU is started up, right clicking on a directory and choosing "Bulk Rename Here" will correctly shift to that directory. And if I do have files selected and they meet the current criteria, they show up as selected. As expected. It is still only on startup and only from explorer that things go wonky.

Again, let me know if you need/want any help testing and or need more info.

Peter S
Bacchus66
 
Posts: 13
Joined: Sat Jun 27, 2020 1:02 am

Re: encountered improper argument

Postby Admin » Tue Nov 10, 2020 7:49 am

Hi Peter S,
could you send a screenshot with the error and the Bulk Rename Utility GUI to support, please?
thanks!
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Re: encountered improper argument

Postby Bacchus66 » Thu Nov 12, 2020 2:57 am

Admin wrote:Hi Peter S,
could you send a screenshot with the error and the Bulk Rename Utility GUI to support, please?
thanks!


I've got several screenshots generated, actually a total of 8 images. In part because I work on three 27" monitors, so in all cases I cropped the images down to the two parts of the scenario. IE Windows explorer and the selected files, and BRU itself. And in part because I accidentally discovered a new scenario, and in fact narrowed down the specific situation where the error occurs.

However, I'm not sure how to get the files to you since I don't seem to be able to attach files or send private messages. Let me know and I can send the images. I've got them in a single zip file already.

In the mean time, here's the info about the files and the scenarios they are for. Plus the specific cause I found.

The images represent three scenarios:

1) Subset of files selected from a network drive/directory.
1 Initial file selection in explorer
2 BRU after launch from explorer right click, showing the error and the files list but no files selected and no active directory.
3 shows that the error persists after a refresh if a folder isn't selected first. And the list of files goes away
4 is after selecting the directory and then doing a refresh. The error goes away, and BRU works fine from there, including after further right clicks.

2) The same subset from a local drive.
1 Initial file selection in explorer
2 BRU after launch from explorer right click, no error and files are selected

3) Subset of files from a small (13 files) network directory.
1 Initial file selection in explorer
2 BRU after launch from explorer right click, no error and files are selected

I sent all three because in trying to generate the error for the screenshots, my first attempt was on the smaller directory. Which worked fine. I went back to a larger directory at that point, and the error occurred. So I started generating the screenshots.

After I had all the screenshots generated, I tried to narrow down the file count to determine the cutoff for generating the error. It seems that the error does not occur if there are 30 or fewer files in the network folder that match the most recent criteria, but does if there are 31. Note that it doesn't matter if there are more than 30 files, only that more than 30 match the filter. As an example, at first I thought the cutoff was at least 33 files, since it worked ok on a directory of that size. But when i started working my way down from 149 files in another directory where the error did occur, I got as low as 33 and it still didn't work.

That's when I noticed that the original folder with 33 files was 30 JPG (the current filter) and 3 PNG. While the other was all JPG, so 33 at that point. Once I removed three more files from that folder, so there were only 30, all JPG, and BRU started fine.

In those tests I was only selecting the directory, not specific files. But I retested with a subset of files selected and got the same result. More than 30 files matching the filter on a network drive and the error happens. 30 or less and it doesn't.

And of course it always works fine from a local drive, regardless of the number of files in the folder.

Thanks again, and let me know about how to get the screen shots to you.
Peter S
Bacchus66
 
Posts: 13
Joined: Sat Jun 27, 2020 1:02 am

Re: encountered improper argument

Postby Admin » Thu Nov 12, 2020 4:57 am

Thank you very much, could you send the zip file to support @ bulkrenameutility.co.uk, please? Much appreciated!
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Re: encountered improper argument

Postby Bacchus66 » Thu Nov 12, 2020 3:46 pm

Sent.
Bacchus66
 
Posts: 13
Joined: Sat Jun 27, 2020 1:02 am

Re: encountered improper argument

Postby Opositive » Sat Jan 23, 2021 10:55 am

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.

For instance, if the .BRU has this you get the error:

[General]
Path="W:\"

If you change it to this the error goes away:

[General]
Path=""

It seems to have something to do with the Filters settings. Whenever there's a Path specified in the .BRU you also get the error when you try to change or reapply the Filters. It looks like the program is getting confused by the Path parameter about what directory it should be parsing but I haven't dug into it deep enough to see exactly what's happening.

In any case, just editing my .BRU files to clear the Path parameter and turning off the "Save on Exit" and "Store Pathname" options under File > Favourites seems to have completely cured this issue for me. I hope that it helps others clean it up as well.

Cheers.
Opositive
 
Posts: 3
Joined: Sat Jan 23, 2021 10:35 am

Next

Return to BRU Support