Page 1 of 1

Delete Multiple Datasets

Posted: Wed Sep 17, 2008 10:04 am
by sshettar
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

Posted: Wed Sep 17, 2008 3:20 pm
by ray.wurlod
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

Re: Delete Multiple Datasets

Posted: Wed Sep 17, 2008 9:05 pm
by 4492_dsnoel
try to use this

orchadmin rm C:\IS_Projects\DS_Data\Target\Sandbox\*.ds

Re: Delete Multiple Datasets

Posted: Fri Sep 19, 2008 9:24 am
by steele
4492_dsnoel wrote:try to use this

orchadmin rm C:\IS_Projects\DS_Data\Target\Sandbox\*.ds
What happens if there are multiple resource disks configured? Go with the shell script!

Posted: Fri Sep 19, 2008 3:49 pm
by ray.wurlod
Typically the descriptor (*.ds) files are not stored on the resource disks - the pathnames on the resource disk(s) are stored within the descriptor files.

Posted: Tue Nov 18, 2008 11:39 pm
by Nagaraj
Shettar were you able to delete the files finally?
Please post the solution and mark it as resolved if you havent