ftp command

Brian K. White brian at aljex.com
Sun Sep 13 20:41:51 PDT 2009



Dennis Malen wrote:
> 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
>
>   

You can't go anywhere on the windows box except where the ftp server is
configured to share.
And, wherever that dir is, it does not appear the same way from the ftp
clients point of view.

There is some dir somewhere which is the root of the ftp server, and ftp
clients can only go there or under there.
Your windows box ftp server could be configured any number of ways which
we don't know.
Is it set to allow anonymous ftp?
Is it set to allow normal login users?
Where is ftp root or home?
Is it set to use isolation mode?

Depending on how the windows box ftp server is configured, you may be
able to ftp using some windows users name & password, and the ftp server
may place you somewhere under that users home dir, or in some
user-specific dir under the ftp server root.

Whatever that dir is in windows, it's just "." from the ftp clients
point of view. (current dir, don't cd anywhere)

If you want to cd somewhere else, and if that somewhere else is even
within the scope of dirs the ftp server serves, and if your login has
permission to go there, then the cd path would be some relative path,
not the absolute C:\something\something path as see from the windows box.

For instance, if all the users have their own ftp server accounts, and
the server isn't running in isolation mode, and you log in as joe, but
want to put files in franks dir, you would just "cd ../frank" , not
C:\somewhere\somewhere\frank , that assumes frank and joe are in the
same parent directory.
I wouldn't do that, it's just to explain the relative path.

Most likely you have to pick (or create) a user on windows, give them an
account and home dir within the ftp server, and then log in as that user
from aix. The windows user can collect these files by creating a
shortcut in their "my documents" that goes to their ftp server share
directory.

http://www.simongibson.com/intranet/ftp2003/

Do not read that and see that you can set the ftp root dir to anything,
and then set C:\ as the ftp root.

-- 
bkw


More information about the Filepro-list mailing list