Computing.Net > Forums > Unix > check file existence on remote serv

check file existence on remote serv

Reply to Message Icon

Original Message
Name: walterja
Date: November 14, 2005 at 11:59:50 Pacific
Subject: check file existence on remote serv
OS: XP
CPU/Ram: 256
Comment:

Hello I have a shell script that runs 5 times a day and ftps to a remote server...i only want it to ftp if $FILE exists on the remote server...here is the script..please help

ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
bin
get $FILE
rename export.prn export.prn.$TIMESTAMP
!cat export.current.prn export.prn > export.new
!mv export.new export.current.prn
!rm export.prn
quit
END_SCRIPT
exit 0


Report Offensive Message For Removal








Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: check file existence on remote serv

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge