spacer
cornerspacercorner
Reply
Occasional Contributor
Nils Wyldbore
Posts: 3
Registered: 02-28-2011
0 Kudos

Deleting multiple attachments

Hi,

 

Does anyone know of a neat way of deleting all attachments from a folder in a single script (server side jScript.Net)?

 

Is there a function to return an array of filenames? That way you could at least loop through this list and delete each attachment one at a time.

 

I'm developing a process that needs to remove all attachments before archiving and I cannot find a definitive way to do this without hacking the database directly.

 

Thanks for your help!

Valued Contributor
BMellert
Posts: 177
Registered: 05-21-2010
0 Kudos

Re: Deleting multiple attachments

While not likely supported, I do something like this when we "copy folder" and we don't want the attachments in the new folder.  It has worked without issue for years.

%ExecSQL("DELETE FROM eAttachment WHERE eKey LIKE '%%%FolderID%%' ") 

 

line spacer line
spacerFollow Metastorm on:
spacer Twitter YouTube Blog iTunes LinkedIn Metastorm Community Central, MC2
spacer Copyright © 2011 OpenText Corporation. All Rights Reserved.spacer About Metastormspacer Privacyspacer Legalspacer Site Mapspacer RSSspacer Contact Us
Microsoft Gold Certified Partner
Powered by Windows Azure
line spacer line