delete files using ftp

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sainath
Premium Member
Premium Member
Posts: 138
Joined: Fri Nov 19, 2004 3:57 pm

delete files using ftp

Post 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
>
>
sainath
Premium Member
Premium Member
Posts: 138
Joined: Fri Nov 19, 2004 3:57 pm

Post by sainath »

hi
Can any one share your idea.how to do the above problem
thks
Sai
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post 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.
Mamu Kim
Post Reply