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.
FTP Remote file existence check
Name: wariomaster Date: March 27, 2007 at 09:09:51 Pacific OS: UNIX CPU/Ram: Unknown Product: IBM
Comment:
My script connects to a remote server via ftp command. I would like it to check for the existence of a file while there and possibly send back a (return code) value for my script to check and determine next step based on whether or not the file exists.
Name: wollie Date: March 29, 2007 at 02:31:57 Pacific
Reply:
Hi Gina,
you can't check it directly via FTP commands. One approach would be to ftp to the server, make a directory listing and pipe the output to a logfile and analyse that logfile. If you receive a positive match, do a second ftp to delete the file.
Summary: 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_...
Summary: Hi, I want to use Shell Script to check multiple file exists and then execute other tasks, I use the following compound condition, but neither succeed. if [ -e check_fin_bbb.complete ] && [ -e fin_bbb...
Summary: it depends upon the umask set on the server where u are ftping the file too. If the umask is set something like 022 then even if you ftp the file with twx permission for others, it will make it read o...