Maximum limit to "Open with".

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
Gandolf

Maximum limit to "Open with".

Post by Gandolf »

admin wrote:...As a first example, the Open With commands now give you the following choice:
- Pass all the items to the same instance of the application...
It does not appear to work with more than 47 documents. Is there a maximum? I tried with two different text editors both of which are multi-document capable.

admin
Site Admin
Posts: 66431
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Maximum limit to "Open with".

Post by admin »

Gandolf wrote:
admin wrote:...As a first example, the Open With commands now give you the following choice:
- Pass all the items to the same instance of the application...
It does not appear to work with more than 47 documents. Is there a maximum? I tried with two different text editors both of which are multi-document capable.
I think it depends on the total length of the command line. There's a limit. Was it 2K?

Gandolf

Re: Maximum limit to "Open with".

Post by Gandolf »

admin wrote:I think it depends on the total length of the command line. There's a limit. Was it 2K?
No. XP SP2.
It is command line dependant and another file managers solution is to open a second (or third) instance of the text editor if the command line is too long. I can normally work with about 70 documents before it opens a second instance.

If it has exceeded the limit then a message of some sort would be a good idea since nothing happens, so one is waiting to see if it will open after a delay.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Post by TheQwerty »

From my testing it appears to be the limit is 2047 characters (at least in XP SP2).

The way Windows handles cases when it is too long is to spit back a generic error message. I think XY should probably do the same.

EDIT: One thing that could be done to improve upon this is to attempt to change working directories to something common to all the files and then formulate the call from there. The path to each file would be shorter so you could get more in before the limit. But that would add another layer of complexity to this.

admin
Site Admin
Posts: 66431
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

TheQwerty wrote:From my testing it appears to be the limit is 2047 characters (at least in XP SP2).

The way Windows handles cases when it is too long is to spit back a generic error message. I think XY should probably do the same.

EDIT: One thing that could be done to improve upon this is to attempt to change working directories to something common to all the files and then formulate the call from there. The path to each file would be shorter so you could get more in before the limit. But that would add another layer of complexity to this.
Yes, that's the way to try...

2047 -- yes, that's what I meant by "2K" (not the OS, Gandolf :) ).

Gandolf

Post by Gandolf »

Interesting, I wonder how the other file manager does it since I've just opened 231 documents across multiple paths from it without any problem. I'm surprised TextPad didn't object to having that many documents opened in it, but it didn't, however, displaying stacked tabs did occupy over half the screen!

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Post by TheQwerty »

Gandolf wrote:Interesting, I wonder how the other file manager does it since I've just opened 231 documents across multiple paths from it without any problem. I'm surprised TextPad didn't object to having that many documents opened in it, but it didn't, however, displaying stacked tabs did occupy over half the screen!
Well if you had TextPad set to force a single instance and the other file manager made multiple calls it would could do that.

Which file manager is this?

Gandolf

Post by Gandolf »

TheQwerty wrote:...Well if you had TextPad set to force a single instance and the other file manager made multiple calls it would could do that.
So command line length is an irrelevant factor in that situation.
TheQwerty wrote:Which file manager is this?
ZTreeWin.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Post by TheQwerty »

Gandolf wrote:
TheQwerty wrote:...Well if you had TextPad set to force a single instance and the other file manager made multiple calls it would could do that.
So command line length is an irrelevant factor in that situation.
It is for the most part. If you're using TextPad in single instance mode it probably makes more sense to have XY use multiple calls.

Gandolf wrote:
TheQwerty wrote:Which file manager is this?
ZTreeWin.
I tried to look into how they handle it, but I can't seem to figure out how to even use it. :oops:

Gandolf

Re: Maximum limit to "Open with".

Post by Gandolf »

admin wrote:...I think it depends on the total length of the command line. There's a limit. Was it 2K?
This might interest you if you want to pursue longer command lines:

http://support.microsoft.com/kb/830473

Two little extracts:
"On computers running Microsoft Windows XP or later, the maximum length of the string that you can use at the command prompt is 8191 characters. On computers running Microsoft Windows 2000 or Windows NT 4.0, the maximum length of the string that you can use at the command prompt is 2047 characters."

However, I suspect this is how the programs I use work with longer command lines since I know that they create a temporary list file:
"Modify programs that require long command lines so that they use a file that contains the parameter information, and then include the name of the file in the command line."

admin
Site Admin
Posts: 66431
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Maximum limit to "Open with".

Post by admin »

Gandolf wrote:
admin wrote:...I think it depends on the total length of the command line. There's a limit. Was it 2K?
This might interest you if you want to pursue longer command lines:

http://support.microsoft.com/kb/830473

Two little extracts:
"On computers running Microsoft Windows XP or later, the maximum length of the string that you can use at the command prompt is 8191 characters. On computers running Microsoft Windows 2000 or Windows NT 4.0, the maximum length of the string that you can use at the command prompt is 2047 characters."
Yes, I know, but at least one user here reported that 2047 is the maximum under XP. (I think) I tried it myself it also found 2047 to be the limit.
Gandolf wrote:However, I suspect this is how the programs I use work with longer command lines since I know that they create a temporary list file:
"Modify programs that require long command lines so that they use a file that contains the parameter information, and then include the name of the file in the command line."
Yep, I plan to go this way with some future feature I have in mind.

Gandolf

Re: Maximum limit to "Open with".

Post by Gandolf »

admin wrote:...Yes, I know, but at least one user here reported that 2047 is the maximum under XP. (I think) I tried it myself it also found 2047 to be the limit....
Ctrl+Alt+P then paste in a line of 3238 characters:

"C:\C:\Program Files\UltraEdit\uedit32.exe" "C:\Downloads\November\01\Info [01].txt" ...... "C:\Downloads\September\30\Info [30].txt"

and hit enter. No problem.

So it's certainly more than 2047.

admin
Site Admin
Posts: 66431
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Maximum limit to "Open with".

Post by admin »

Gandolf wrote:
admin wrote:...Yes, I know, but at least one user here reported that 2047 is the maximum under XP. (I think) I tried it myself it also found 2047 to be the limit....
Ctrl+Alt+P then paste in a line of 3238 characters:

"C:\C:\Program Files\UltraEdit\uedit32.exe" "C:\Downloads\November\01\Info [01].txt" ...... "C:\Downloads\September\30\Info [30].txt"

and hit enter. No problem.

So it's certainly more than 2047.
I tried it with photoshop and uedit: my limit is 2047. This might be actually a limit of the shellexecute api by which I call the apps. Could not find any documentation.

Post Reply