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?
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.