Unable to execute - arguments list is too long 
Author Message
 Unable to execute - arguments list is too long

Selecting files in IE and sending them
to my script (below) via a link in the SendTo folder,
pops up a list of the files sent
--- provided there aren't too many of them,
- say less than about 13. But I want
to be able to send an  arbitrarily long list
of selected file names to the script.

Tweak's "SendTo Clipboard as Name"
doesn't have that limitation, so one idea
is to send the list to the clipboard first
and read them from there. However, I
don't know how to glue the tweak thing
into a script.  

( If you Send Tweak's  "SendTo\Clipboard as Name"
to  "Clipboard as Name"
you get "C:\WINDOWS\SendTo\Clipboard as Name.NameOnClipboard"
on the clipboard, and that file extension ---  .NameOnClipboard ----
is associated with CLSID\{7BB70120-6C78-11CF-BFC7-444553540000}
in the registry. But I don't honestly know what to do about it.  :/

There are also things like VBSDrop.dll
and WSHdrop.dll -- "DropHandler shell extensions" --
The "WSHdrop.dll" handler that I'm talking about is the one mentioned
in Dino Esposito's "Windows Script Host programmer's reference" [wrox].
Looking inside it it seems to me to assign itself as the DropHandler
for vbsfile, jsfile, wsfile, vbefile, and jsefile files--- but not what I would
want to use, which would probably be a "plsfile" - perl-script-file.
However I doubt that simply imitating the registry entries of the others
for "plsfile" would work  - and I don't really see why a "drop handler" is
necessary anyway just to be able to send a longer lists of file names to a script.

So I guess this is my question:  does "arguments list is too long"
simply mean that the command line is too short? And if so, can it be
expanded in script? And if so, how? And by how much would be enough?

~greg  

<job id="test">
  <script language="PerlScript">

    $a = $WScript->Arguments;

    for( $i=0; $i < $a->Count; $i++ )
    {
       $files .= $a->Item($i) . "\n";
    }

    $WScript->Echo( $files);

  </script>
</job>



Wed, 09 Mar 2005 21:29:19 GMT  
 Unable to execute - arguments list is too long
The Send To Clipboard and script file drag/drop handler support (both Dino's and the one now provided with WSH) are all shell extensions that get the list of files/folders via COM interfaces with Windows Explorer.  

The drag/drop handlers have only one way to pass all of these to a script and that is as arguments on the script's command line.

The limitation on command line length is imposed by the operating system and you can't get around it.

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--



Sat, 12 Mar 2005 04:04:39 GMT  
 Unable to execute - arguments list is too long
Greg,

As Michael Harris explained, there's no way around this with the SendTo
menu.

The only workaround that I know will work only IF all the files that you are
selecting are the same type.  In that case, you can reference your script
under the progid for that file type as a context menu action
(HKCR\<progid>\shell\<verb>\command\=script).  The context menu handler
handles multiple files by running the associated "command" for each file
selected singly and repetitively, instead of building a long command line.
But all files you select must be the same (or at least have the same verb
under different progids) for the option to show up in the context menu.

Regards,
Joe Earnest

Quote:

> Selecting files in IE and sending them
> to my script (below) via a link in the SendTo folder,
> pops up a list of the files sent
> --- provided there aren't too many of them,
> - say less than about 13. But I want
> to be able to send an  arbitrarily long list
> of selected file names to the script.

> Tweak's "SendTo Clipboard as Name"
> doesn't have that limitation, so one idea
> is to send the list to the clipboard first
> and read them from there. However, I
> don't know how to glue the tweak thing
> into a script.

> ( If you Send Tweak's  "SendTo\Clipboard as Name"
> to  "Clipboard as Name"
> you get "C:\WINDOWS\SendTo\Clipboard as Name.NameOnClipboard"
> on the clipboard, and that file extension ---  .NameOnClipboard ----
> is associated with CLSID\{7BB70120-6C78-11CF-BFC7-444553540000}
> in the registry. But I don't honestly know what to do about it.  :/

> There are also things like VBSDrop.dll
> and WSHdrop.dll -- "DropHandler shell extensions" --
> The "WSHdrop.dll" handler that I'm talking about is the one mentioned
> in Dino Esposito's "Windows Script Host programmer's reference" [wrox].
> Looking inside it it seems to me to assign itself as the DropHandler
> for vbsfile, jsfile, wsfile, vbefile, and jsefile files--- but not what I
would
> want to use, which would probably be a "plsfile" - perl-script-file.
> However I doubt that simply imitating the registry entries of the others
> for "plsfile" would work  - and I don't really see why a "drop handler" is
> necessary anyway just to be able to send a longer lists of file names to a
script.

> So I guess this is my question:  does "arguments list is too long"
> simply mean that the command line is too short? And if so, can it be
> expanded in script? And if so, how? And by how much would be enough?

> ~greg

> <job id="test">
>   <script language="PerlScript">

>     $a = $WScript->Arguments;

>     for( $i=0; $i < $a->Count; $i++ )
>     {
>        $files .= $a->Item($i) . "\n";
>     }

>     $WScript->Echo( $files);

>   </script>
> </job>



Sat, 12 Mar 2005 06:50:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Unable to execute - arguments list is too long

2. unable to execute - arguments list is too long...

3. argument list too long errors

4. Ghostview 3.3 + Ghostscript 6.01 unable to print to HP Deskjet 1600C [LONG]

5. WSH 5.6 argument definitions - am I missing something?

6. unable to execute dos commands

7. registry %1 argument and short/long path names

8. I am having trouble executing a .exe file on the server

9. Execute a Program that has LONG FILE NAMES

10. Question on adding a long list of numbers?

11. function argument list...

12. variable size argument list in vbs?

 

 
Powered by phpBB® Forum Software