ftp command

Mike Schwartz mschw at athenet.net
Sun Sep 13 20:11:57 PDT 2009


     The FTP server in the windows machine is probably setup to put you in a
specific subdirectory after you finish your FTP login.  Normally this is not
the root subdirectory on the C: drive.  (You should know which subdirectory
that is if you installed the Windows FTP software.  If not, FTP into the
Windows machine manually and do an "LS" command or put a file named 123xyz
onto the Windows machine and search the Windows box to see where it is
placed.)

     The easiest thing to do is to setup the FTP server software on the
windows machine to start you off in the "Documents and settings"
subdirectory.  That way you won't need to do a CD command at all.

     Most Windows machines (XP, Vista, etc.) have the "Documents and
settings" subdirectories protected, so that you can't move files in and out
of those subdirectories with any of the network or FTP commands.  (This
depends on the level of service packs you have put on the machine and
doesn't apply to Windows '98, ME, and older Windows versions.  Your FTP
server software might allow you override this protection, though.)  Try
making a C:\public subdirectory on the Windows box, and FTP your files into
that subdirectory.

     You should leave the C:\ off of your commands.  Most likely, you can
safely assume you are on the C: drive after you FTP in (unless you have
directed the FTP software on your Windows machine to place you on a
different drive).  Most likely, the Windows boxes you are FTPing into only
have a C: drive, anyway, so the C: is probably unnecessary.

     You can try putting double quotes around the name, like:

ftp> cd "documents and settings"

     Or, you can use the 8.3 file name:

ftp> cd docume~1

     (If you don't know the 8.3 file name for the directory, go to the
Windows machine, open up a command prompt window, change directory to C:\
and type in:

dir /X

Here's an example of manually entered FTP commands:

ftp>open allfiles.bus.umich.edu
User (allfiles.bus.umich.edu:(none)): [your UniqName]
Password: (enter it, but it won't show what you type)
ftp>cd Departments
ftp>cd Davidson
ftp>cd "development consulting services"
ftp>cd USAID
ftp>cd "field LWA"

    Hope that helps...

Mike Schwartz

> -----Original Message-----
> From: filepro-list-bounces+mschw=athenet.net at lists.celestial.com
> [mailto:filepro-list-bounces+mschw=athenet.net at lists.celestial.com] On
> Behalf Of Dennis Malen
> Sent: Sunday, September 13, 2009 9:33 PM
> To: Kenneth Brody; ROBERT PULLIAM
> Cc: filepro
> Subject: Re: ftp command
> 
> Before I create a filePro program that can FTP to a winders server and
> am
> trying to confirm how I change the remote windows directory to
> "Documents
> and Settings".
> 
> I have combined the information Ken Brody provided and googled this
> issue.
> 
> What I have found is that the "lcd" command is for the local box (AIX
> UNIX
> in my case). CD is used to change the remote directory. That being the
> case
> I have tried many variations. From my google reseaerch it appears that
> the
> following should work:
> 
> cd "c:\Documents and Settings"
> 
> In every variation I used I get an error telling me the directory can
> not be
> found.
> 
> To reconfirm: I am experimenting from the command line in AIX UNIX
> before I
> create filePro code.
> 
> I am doing the following successfuly:
> 
> ftp IPAddress
> login name
> password
> ascii
> 
> Here's the problem:
> cd "c:\Documents and Settings" (or some variation thereof)
> 
> I get an error that the directory cannot be found.
> 
> Does anyone have any ideas?
> 
> Dennis Malen
> 516.479.5912
> 
> ----- Original Message -----
> From: "Kenneth Brody" <kenbrody at spamcop.net>
> To: "ROBERT PULLIAM" <pulliamr at earthlink.net>
> Cc: "filepro" <filepro-list at lists.celestial.com>
> Sent: Friday, September 11, 2009 12:02 PM
> Subject: Re: ftp command
> 
> 
> > ROBERT PULLIAM wrote:
> >> I need to ftp a file from a unix box to a windows box - can anyone
> help
> >> me with the syntax?
> >
> > c:\> ftp hostname
> >
> > ftp> cd /path/to/file
> > ftp> lcd \path\to\save\file
> >
> > ftp> binary   <== If file is binary
> > or
> > ftp> ascii    <== If file is text
> >
> > ftp> get filename
> > ftp> quit
> >
> >
> > --
> > Kenneth Brody
> > _______________________________________________
> > Filepro-list mailing list
> > Filepro-list at lists.celestial.com
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.13.94/2367 - Release Date:
> 09/13/09 17:50:00



More information about the Filepro-list mailing list