Hi All,
i wanted to know how to delete multiple datasets in one command line . I did go through couple of posts but dint find any soultion for my requirement .
Most of our intermediate datasets are stored in one staging folder and we have several datasets . now we need to delete all of these datsets once all our jobs have run at the end of the day .
I tried using execute command stage at the end of my job sequence and gave the command
orchadmin delete C:\IS_Projects\DS_Data\Target\Sandbox\ds_valid
It is working fine if i delete one dataset
But i want to delete all the datsets in the folder C:\IS_Projects\DS_Data\Target\Sandbox\ and i tried giving this command
orchadmin delete C:\IS_Projects\DS_Data\Target\Sandbox\*.ds
It dint work
i also gave (since we store all our datasets names as ds_dataset_name
orchadmin delete C:\IS_Projects\DS_Data\Target\Sandbox\ds_*
It dint work too
I would appreciate if someone could help me achieve this
Thanks
Delete Multiple Datasets
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
How about a shell script that loops through the file names generated by the regular expression and issues the orchadmin against each? (Yes, I know you're on Windows, and I also know that MKS Toolkit installs with version 8.0 on Windows, so you can use a shell script.)
Code: Select all
for filename in /IS_Projects/DS_Data/Target/Sandbox/*.ds
do
orchadmin delete $filename
done
Last edited by ray.wurlod on Wed Sep 17, 2008 9:27 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 5
- Joined: Wed Sep 17, 2008 12:24 am
- Location: Think BIG ,Start small and Skills fast
Re: Delete Multiple Datasets
try to use this
orchadmin rm C:\IS_Projects\DS_Data\Target\Sandbox\*.ds
orchadmin rm C:\IS_Projects\DS_Data\Target\Sandbox\*.ds
Think BIG,start small & skills FAST...
Re: Delete Multiple Datasets
What happens if there are multiple resource disks configured? Go with the shell script!4492_dsnoel wrote:try to use this
orchadmin rm C:\IS_Projects\DS_Data\Target\Sandbox\*.ds
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: