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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

check file existence on remote serv

Reply to Message Icon

Name: walterja
Date: November 14, 2005 at 11:59:50 Pacific
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



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: check file existence on remote serv

FTP Remote file existence check www.computing.net/answers/unix/ftp-remote-file-existence-check/7756.html

Check Multiple File Exists www.computing.net/answers/unix/check-multiple-file-exists/4775.html

renaming files based on date arguments www.computing.net/answers/unix/renaming-files-based-on-date-arguments/2499.html