ftp mget directory

Hi,

I have searched everywhere for an answer to this question but couldn't find one so I ask it here.

From an AIX 5.3 machine I ftp to another AIX 5.3 server. I want to get all files and only files in a directory. This directory has a subdirectory with files in it.

In ftp, I enter the commands:

cd <remote-directory>
prompt
mget *

The files in the subdirectory are also transferred.
How can I prevent mget from transferring files in subdirectories?

-Bart

I have no direct solution to this - I recommend setting up ssh and so with use scp without a -r for being recursive. It is encrypted and when keys are exchanged even more comfortable to use.

If you're desperate to use FTP then the one other solution might be to have a user that doesn't have permissions to the subdirectory, run the ftp script.

But that would be getting quite messy and scp really is a better solution if you can use it.

Thanks for the suggestions, neither is an option at this site.

Is this behavior AIX-specific?

-Bart

Edit: post deleted

got you wrong :wink:

Not sure if I was clear, but I DON'T want the files in subdirectories to be transferred, but they DO.

---------- Post updated at 08:53 AM ---------- Previous update was at 08:50 AM ----------

I think I solved the problem.

mget .

skips the subdirectories!