
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>