analyst1411
MIS
Hi,
I need to connect to a remote system and download files from a certain directory. I already have a script that does just that, however, for each file I download, I have to move it to an ARCHIVE directory on the remote system. Can anyone help in giving me tips on doing this? Can this be done within one FTP connection or will I need to get a list of files and then connect again to download the files from the list that was created?
Any help would be greatly appreciated.
Here is the script I already have:
#!/bin/sh
clear
# changing working directory
cd /COMM
# Setting variables
WNAME=ftp.abccompany.com
FTPU=User
FTPP=Password
# starting ftp process
echo "CONNECTING... "
ftp -n -v $WNAME <<EOF
user $FTPU $FTPP
cd /OUT
bin
prompt off
umask 0
mget file*.*
mv file*.* ARCHIVE
bye
EOF
Thank you,
analyst1411
I need to connect to a remote system and download files from a certain directory. I already have a script that does just that, however, for each file I download, I have to move it to an ARCHIVE directory on the remote system. Can anyone help in giving me tips on doing this? Can this be done within one FTP connection or will I need to get a list of files and then connect again to download the files from the list that was created?
Any help would be greatly appreciated.
Here is the script I already have:
#!/bin/sh
clear
# changing working directory
cd /COMM
# Setting variables
WNAME=ftp.abccompany.com
FTPU=User
FTPP=Password
# starting ftp process
echo "CONNECTING... "
ftp -n -v $WNAME <<EOF
user $FTPU $FTPP
cd /OUT
bin
prompt off
umask 0
mget file*.*
mv file*.* ARCHIVE
bye
EOF
Thank you,
analyst1411