Page 1 of 1

How do you delete files in particular directory using DS Job

Posted: Fri Mar 04, 2005 5:09 am
by pongal
Hi
I wanted to delete .dsx files in a temporary folder resides at DS Server using DS JOB.
Thanks in advance....

Posted: Fri Mar 04, 2005 5:46 am
by Sainath.Srinivasan
Are you having both Server and Client installed in the same machine?

Because the dsx is generally produced on the client machine.

If you want to delete it, use the windows 'Search' option and decide which ones to delete. This is because the dsx are used to backup the DataStage Project components.

Can you provide an example where these are created in temporary directories?

Note - dsjob are used to run new jobs and hence not needed for this purpose.

Posted: Fri Mar 04, 2005 1:47 pm
by kduke

Code: Select all

openpath "MyDir" to MyDir else stop
delete MyDir, "Filename" else stop
You can do this in a routine. I would suggest you do some error logic instead of using "stop" or Ray will be upset. I would pass the directory and filename as arguments. You could also do this in job control code as well.

Re: How do you delete files in particular directory using DS

Posted: Wed Mar 09, 2005 6:42 am
by nandu_infy
juz call a shell script from the job and do

cd <urDir>
del *.dsx