Discussion:
Shell command with colon
(too old to reply)
lestersal
2003-12-05 03:28:02 UTC
Permalink
When I try to run the following command in Visual Basic it works:

#1. Call Shell("ftp -i ftpservername", vbNormalFocus)

When I try it with the -s switch, however, it does not:

#2. Call Shell("ftp -i -s:unixcommands.bat ftpservername", vbNormalFocus

The problem is the colon after the -s in line #2. DOS will accept the line
if typed in manually, but it does not seem to
recognize it programatically.

Is there some way I can use escape characters or something similar to get
DOS to accept line #2 programatically?

Thanks,
Alistair Saldanha
Phil Robyn
2003-12-05 08:13:31 UTC
Permalink
Post by lestersal
#1. Call Shell("ftp -i ftpservername", vbNormalFocus)
#2. Call Shell("ftp -i -s:unixcommands.bat ftpservername", vbNormalFocus
The problem is the colon after the -s in line #2. DOS will accept the line
if typed in manually, but it does not seem to
recognize it programatically.
Is there some way I can use escape characters or something similar to get
DOS to accept line #2 programatically?
Thanks,
Alistair Saldanha
See the response in alt.msdos.batch.nt
--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a i l
lestersal
2003-12-06 01:41:14 UTC
Permalink
Thanks. I tried the following and it worked, I needed to put in the drive
and directory:

Call Shell("ftp -i:c:\unixcommands.bat ftpservername", vbNormalFocus)

Thanks for your help, Phil
Alistair
Post by Phil Robyn
Post by lestersal
#1. Call Shell("ftp -i ftpservername", vbNormalFocus)
#2. Call Shell("ftp -i -s:unixcommands.bat ftpservername",
vbNormalFocus
Post by Phil Robyn
Post by lestersal
The problem is the colon after the -s in line #2. DOS will accept the line
if typed in manually, but it does not seem to
recognize it programatically.
Is there some way I can use escape characters or something similar to get
DOS to accept line #2 programatically?
Thanks,
Alistair Saldanha
See the response in alt.msdos.batch.nt
--
Phil Robyn
Univ. of California, Berkeley
u n z i p m y a d d r e s s t o s e n d e - m a i l
Loading...