Page 1 of 1

delete files using ftp

Posted: Fri Nov 24, 2006 7:03 am
by sainath
I have to write small ftp script .
I have a target file in the below location and it has 2 columns .

#outputDir#ETL_FINALIZED_PROPOSAL/EIM_EXTRACTED_PDF_list
1. LocalPath 2. LocalFileName

I have to delete the files in the remote location with following
parameters
if LocalFileName = Remotefilename

ftp Servername
Username
Passwordname
Remotepath
Remotefilename

> I think we have to write a for or while loop until it delete all the
> matching files.
where can i find examples.
please share your thought.
thks
>
>

Posted: Fri Nov 24, 2006 4:07 pm
by sainath
hi
Can any one share your idea.how to do the above problem
thks
Sai

Posted: Sat Nov 25, 2006 1:02 pm
by ray.wurlod
Etiquette Note
If no-one has replied it means one of a number of things.
>> They don't know.
>> They haven't had a chance to log in (it IS a holiday weekend in the US)
>> They don't care. Very rare at DSXchange.
>> They're still thinking about it.
"Push" posts such as yours don't really help.


Why don't you try some approach akin to what you suggested? If it works, post the solution and help others. If it doesn't work, post the error message; it will make it that much easier to diagnose and help.

Posted: Sat Nov 25, 2006 5:35 pm
by kduke
The problem with FTP is it is hard to trap errors. I would use rsh or rexec to remotely execute the command. There are secure shell versions of these commands as well. You can trap the errors better.