unable to execute - arguments list is too long... 
Author Message
 unable to execute - arguments list is too long...

If I drop more then 5 files I get This error??
How can I prefend this?

This is the script..
Am I doing something wrong here?

set oArgs=wscript.arguments
set oWsh=CreateObject("Wscript.Shell")

if oArgs.Count=0 then
    oWsh.popup "No Arguments passed!",1,"",16
else

for i=1 to oArgs.Count

next

end if

regards
Morfer-



Sun, 11 Jan 2004 16:40:37 GMT  
 unable to execute - arguments list is too long...
hi Morfer,

You may be running into a limitation of how long the command line can be.
I'm not sure about what the actual limitation is, but generally I would be
suspicious of anything longer than 260 characters.

For somebody PROGRAMMING the call to their script, the usual advice is to
"compress" the file names by using the "shortpath" property, which produces
those cryptic things you sometimes see in dos, i.e., blahbl~1/foobar~2/...

But for somebody who is launching by draging and dropping, that won't work,
so you may have to develop another strategy.

Or maybe somebody else will come along with a better idea.

cheers, jw


Quote:
> If I drop more then 5 files I get This error??
> How can I prefend this?

> This is the script..
> Am I doing something wrong here?

> set oArgs=wscript.arguments
> set oWsh=CreateObject("Wscript.Shell")

> if oArgs.Count=0 then
>     oWsh.popup "No Arguments passed!",1,"",16
> else

> for i=1 to oArgs.Count

> next

> end if

> regards
> Morfer-



Mon, 12 Jan 2004 00:55:17 GMT  
 unable to execute - arguments list is too long...

Quote:

> If I drop more then 5 files I get This error??
> How can I prefend this?

> This is the script..
> Am I doing something wrong here?

> set oArgs=wscript.arguments
> set oWsh=CreateObject("Wscript.Shell")

> if oArgs.Count=0 then
>     oWsh.popup "No Arguments passed!",1,"",16
> else

> for i=1 to oArgs.Count

> next

> end if

> regards
> Morfer-

Just a guesswork. Two possible causes :
[1] Would the effective length of cmdline be in the range of 127 -
255+ char or beyond ? (Q121059/Q148754)
or
[2] Could it be something gone wrong in the for-next, within which
access to the oArgs be made in the form of oArg(i) rather than
oArgs(i-1)? The collection is zero-based.


Mon, 12 Jan 2004 01:23:08 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