Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP unexpectedly quits after mdel

Status
Not open for further replies.

Ollever18

Programmer
Aug 31, 2009
3
US
Have a problem here where I'm connecting from a Linux machine to a Windows machine and the FTP unexpectedly exits after a mdel command. It doesn't even attempt the next command. I'm using KSH, FTPing a number of files that start with the job name and have a unique identifier after it (not necessarily in numerical order). Should be pretty simple.

Code:
ftp -n -v $FtpSvr <<++DEL++ > $logPath/job1_FTPa.log
user $FtpUsr $FtpPsw
mdel job1_comp*
lcd $dest
!sleep 5
mput job1_comp*
++DEL++

The mdel works perfectly but then quits. Below are the last two lines of the log file:

mdel job1_comp1.txt? 250 DELE command successful.
mdel job1_comp8.txt? 250 DELE command successful.
221 Goodbye.

From what the log is showing, I don't think it even attempts to run the lcd. When I rerun the job, it successfully FTP's the number of files expected. Has anyone seen this behavior before? I have a kludge workaround where I break up the mdel and mput into their own FTP sessions but from what I've seen in samples and other forums, my code should work.

Thanks
 
Sorry I posted this in the wrong place, I've been searching anywhere for answers on this.
 
OK, apparently the issue was the I needed the -i option on the ftp call to turn off interactive prompting. Several tests with 1-15 files have worked out OK. Will close the thread.
 
So is this actually php FTP

Or should this question be in forum619?



Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top