Hi
I have server A and server B.
On server B the directory is called /tmp/hmp
On server A I want to get the files on server B:/tmp/hmp via FTP. After I have got the files via FTP I have to delete them. In the script below I'm affraid of that I delete files before I get them by ftp.
#!/bin/bash
ftp -in server B<<END_SCRIPT
quote USER abc
quote PASS XXXX
bin
prompt off
cd /tmp/hmp --folder on ftp
lcd /production/hmp --folder on local drive
mget *.*
mdel *.*
bye
END_SCRIPT