Hi All,
I want to search for .log files from folders and sub folders in remote server and FTP them to one particular folder in the local machine. I dont want to copy the entire directory tree structure, just have to take all the .log files from all the folders by doing a recursive search from the remote directories using FTP and place it to one particular folder in the local
ftp -ni 2>$RUNNUM.log <<!
open $REMOTESERVER
user $USERID $TPPWD
cd $REMOTEDIR
mget *.xml
quit
!
with the above I can get the files from one directory, but my directory structure is as below
REMOTEDIR= /home/sales
with in sales I can have many subfolders like
/home/sales/Jan
/home/sales/feb
/home/sales/march
and even those folders can have subfolders like /home/sales/Jan/abc
I want to do a recursive search in the remote directory and look for .xml files from all the subfolders inside sales folder and ftp those xml files to my local machine.