Shell to Command

From: Jean (Jean_at_NoSpam.com)
Date: 10/25/04


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


Relevant Pages

  • Re: ftp nologin problem
    ... 530 Login incorrect. ... tell me how can I correct this problem cause I don't want to give user a shell. ... accounts can be used with FTP. ... rsync or scp over ssh. ...
    (freebsd-questions)
  • Re: Titel neben =?UTF-8?B?TWVuw7wgc3RhdHQgZGFyw7xiZXI6IEV1cmUgQmV3ZXJ0dW5nPw==?=
    ... das ist reine Haarspalterei. ... Manche FTP Server erlauben es, "virtuelle Verzeichnisse" zu bauen - also ... Shell und in der Shell führt der Client dann irgendwelche Befehle ... Das ist aber unabhängig von ssh und funktioniert z.B. mit rsh ...
    (de.comp.os.unix.apps.kde)
  • Re: Only an ftp account
    ... > You may also want to add that user to /etc/ftpchroot which will chroot ... >> How would I be able to give an account to someone where they can only ... >> login and use FTP? ... Let me just point out that just changing the shell to /sbin/nologin ...
    (FreeBSD-Security)
  • Re: COMMAND SHELL PROGRAMMING.
    ... But if you wish to do write FTP script on client receiving the file, ... write a DOS shell script like this: ... REM Get user's input - Mainframe IP, FTP ID, Pwd etc... ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • [HPADM] RE: ftp only account (Summary)
    ... those lines) in /etc/shells and then create the login with that as it's ... This will allow the user to ftp in, but not to have shell access. ... System Administrator ...
    (HP-UX-Admin)