Shell to Command
From: Jean (Jean_at_NoSpam.com)
Date: 10/25/04
- Next message: news.microsoft.com: "cancel form and variables in data environment"
- Previous message: Dave: "Re: output contents of a listbox to a sequential file"
- Next in thread: Rick Rothstein: "Re: Shell to Command"
- Reply: Rick Rothstein: "Re: Shell to Command"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 25 Oct 2004 06:41:03 -0700
I have a VB6 program that shells to the dos prompt then opens an ftp session
to an IP address (obtained from a text file) and reads ftp commands from
another text file. The ftp session transfers a file from the remote device to
the local pc. The output is then redirected to another text file which will
be searched to determine the results of the file transfer. Below is a portion
of my code:
dReturn = Shell(Environ("ComSpec") & " /c ftp "ftp -i -s:" & <input file> &
" " & <IP address> & " > " & <output file>, vbHide)
I am developing this program on Win2000. For some reason the shell function
requires short path names for the location of the ftp command input file and
the redirected output file. Any idea why it requires short pathnames? If I
manually start a dos session and type in the command line ftp, it will work
with long path names. Am I missing something in the shell function?
This program will be used on Win98, WinNt 4.0, Win2000, and WinXP. Does the
Shell function work differently on each OS?
Thank you for any suggestions.
-- Jean
- Next message: news.microsoft.com: "cancel form and variables in data environment"
- Previous message: Dave: "Re: output contents of a listbox to a sequential file"
- Next in thread: Rick Rothstein: "Re: Shell to Command"
- Reply: Rick Rothstein: "Re: Shell to Command"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|