Board index » delphi » long command lines

long command lines

Can anyone tell me how I can issue a command (to either dos or windows) that is longer than 256 characters? It's only a copy command, but the directory structure is really big...
My friend has found a way around this: out put the command to a bat file and execute the bat. this seems a rather clunky way to do it. any ideas?
 

Re:long command lines


Quote
Krash wrote in message <3636B3B7.6464A...@hunterlink.net.au>...
>Can anyone tell me how I can issue a command (to either dos or
windows)
>that is longer than 256 characters? It's only a copy command, but the
>directory structure is really big...
>My friend has found a way around this: out put the command to a bat
file
>and execute the bat. this seems a rather clunky way to do it. any

ideas?

And the batch file works? That is a surprise. The command line
parameters
are put into a string by DOS (at least in older versions) at $80 in
the
256-byte PSP where they can be parsed by a program. So even if the
program
is being called from a batch file it still shouldn't be able to see
more
than 126 bytes or so (leaving room for a length byte and trailing
carriage
return). I wonder whether Win95 has another mechanism? And if so, can
it
be accessed from Pascal?

FP

Other Threads