Script to delete all attachments
Hi all
I was wondering whether there is a script to delete all of the attachments in a pdf form? I know that you can use removeDataObject to delete specific attachments by name, but was wondering whether there was a simple way to delete all of the attachments in one hit?
Cheers
Mark
You just need to loop through the dataObject.
// DUMP ANY ATTACHMENTS
var d = event.target.dataObjects;
if (d != null)
for (var i = 0; i < d.length; i++)
// console.println("Data Object[" + i + "]=" + d[i].name);
event.target.removeDataObject(d[i].name);
Similar Messages
-
Script that deletes all the data in the DB
Somebody has or know a script that delete all the data (but not the tables) of the database???? I have dummy data and know I need the tables clean of data.
How can I delete it???????? Thank you for you help
JavierYou could truncate all the tables with the following commandTRUNCATE TABLE <table_name>;This will delete all the data in the table while keeping the table structure, contraints, indexes, triggers, etc. intact so they wont have to be rebuilt. All foreign keys must be disabled to use the TRUNCATE command.
-
Why is email usage on ios7 ipad so high up to 918 Have deleted all attachments?
Why is email usage up to 918 ? Have ios7 and have deleted all attachments and old saved emails?
Why is email usage up to 918 ? Have ios7 and have deleted all attachments and old saved emails?
-
Rule or script to delete specific attachments in Mail?
Some people send signature images with every email, wasting disk space and making it difficult to search for emails with useful attachments.
I would like to have a rule or script that deletes PointlessLogo.gif from incoming mail, while leaving other attachments intact.
A search of the archives turns up a thread from years ago asking the same thing, apparently it was not possible with OS 10.4 (https://discussions.apple.com/message/4133181#4133181).
Does this capability exist in Mountain Lion?Some people send signature images with every email, wasting disk space and making it difficult to search for emails with useful attachments.
I would like to have a rule or script that deletes PointlessLogo.gif from incoming mail, while leaving other attachments intact.
A search of the archives turns up a thread from years ago asking the same thing, apparently it was not possible with OS 10.4 (https://discussions.apple.com/message/4133181#4133181).
Does this capability exist in Mountain Lion? -
Generate script to delete all schemas
Hello All,
I'm going to do a reimport and i want to delete all the schemas in the db....
I've written this script:
select 'DROP TABLE schemaname.' || TABLE_NAME || ' CASCADE CONSTRAINTS;'
from dba_tables
where owner = 'schemaname'
order by TABLE_NAME;
how can i generate the script for all the schemas? The above will only list one schema...
Basically i want to do another import and get a clean log (as clean as possible).
Thanks.You modify your query to select a distinct list of object owners. In fact you might want to look for some other objects besides tables. If you are only interested in tables you should probably change the subquery to look at dba_tables.
select 'DROP TABLE '||owner||'.' || TABLE_NAME || ' CASCADE CONSTRAINTS;'
from dba_tables
where owner in (select distinct owner from dba_objects
where owner not in ('SYS','SYSTEM','OUTLN','PUBLIC')
order by TABLE_NAME;
You should look the list of owners over very carefully before running the resulting DDL commands. There are other owners, depending on your Oracle version and features in use, that you will not want to touch.
HTH -- Mark D Powell -- -
A script to delete all table rows containing a specific text
Hello,
I've tried some old scripts but can't get around to the right solution.
I need a script that will delete all rows in a table that contain a specific single-word text, something like "xxx".
Anyone's got an idea?
ThanksHi,
To remove a row use row.remove() method.
So iterate through table.rows and remove the one matched a condition.
If we talk about condition you have to be more accurate - what do you mean "a row contain a text":
==> 1st cell contains,
==> any cell contains.
Entire row contents is an array of its cells.contents, so your 1st row text is:
rows[0].contents.join(" ") ==> string
Jarek -
How can I create a script to delete all Layer Comps?
I know this has to be pretty easy but I'm flummoxed on the syntax. Thanks, in advance!
// 2012, use it at your own risk;
#target photoshop
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
while (myDocument.layerComps.length > 0) {
myDocument.layerComps[0].remove() -
Deleting all instances of a particular composite using scripts
Hi,
I am trying to delete all the instances for a particular composite id in Linux. I got some reference to some script in user guide as below
Deleting Composite Instances, Rejected Messages, and Orphaned Instances
This procedure internally invokes the procedures for deleting composite instances, rejected messages, and orphaned instances. This procedure is convenient for deleting all composite instances, rejected messages, and orphaned instances in a single invocation.
FABRIC.DELETE_ALL(FILTER IN INSTANCE_FILTER,
MAX_INSTANCES IN INTEGER,
PURGE_PARTITIONED_DATA IN BOOLEAN DEFAULT TRUE) RETURN INTEGER;
The following example deletes composite instances, rejected messages, and orphaned instances based on the specified filter.
DECLARE
FILTER INSTANCE_FILTER := INSTANCE_FILTER();
MAX_INSTANCES NUMBER;
DELETED_INSTANCES NUMBER;
BEGIN
FILTER.COMPOSITE_PARTITION_NAME:='default';
FILTER.COMPOSITE_NAME := 'OrderBookingComposite';
FILTER.COMPOSITE_REVISION := '1.0';
FILTER.STATE := fabric.STATE_COMPLETED_SUCCESSFULLY;
FILTER.MIN_CREATED_DATE := to_timestamp('2009-07-01','YYYY-MM-DD');
FILTER.MAX_CREATED_DATE := to_timestamp('2009-08-24','YYYY-MM-DD');
MAX_INSTANCES := 100;
DELETED_INSTANCES := FABRIC.DELETE_ALL(
FILTER => FILTER,
MAX_INSTANCES => MAX_INSTANCES
END;
But how do I use it. Should I just run @purge_fabric_oracle.sql and will it prompt for parameters. Also Is this the right script to delete all the instances.
Regards
Edited by: user5108636 on 22/06/2010 16:53For deletion scripts I am particularly cautious. I want to delete all the instances for a particular composite id. How do I get the composite id. ProcessData [1.0] is shown in the EM under the soa application tree. Is it the composite id.
Thanks -
Script to Delete more than 1 user from the database
Hi All,
I have a list of users in a file and i want to write a script to delete all these
users from my database.
I have tried deleting users using:
drop user user1,user2,user3..... but it doesn't seem to work.
Can anyone suggest how do i read the users from the file and delete them one by oneYou can use an external table :
SYS@db102 SQL> select username from all_users
2 where username like 'USER%';
USERNAME
USER1
USER2
USER3
SYS@db102 SQL> !cat users_to_drop.txt
USER1
USER2
USER3
SYS@db102 SQL> create table test.users_to_drop
2 (
3 userx char(30)
4 )
5 organization external
6 ( type oracle_loader
7 default directory work
8 access parameters
9 ( records delimited by newline
10 )
11 location ('users_to_drop.txt')
12 )
SYS@db102 SQL> /
Table created.
SYS@db102 SQL> begin
2 for U in (select userx from test.users_to_drop) loop
3 dbms_output.put_line('Dropping '||U.userx);
4 execute immediate 'drop user '||U.userx||' cascade';
5 end loop;
6 end;
SYS@db102 SQL> /
Dropping USER1
Dropping USER2
Dropping USER3
PL/SQL procedure successfully completed.
SYS@db102 SQL> select username from all_users
2 where username like 'USER%';
no rows selected
SYS@db102 SQL> -
Script for deleting objects on pasteboard
Anyone have a script that deletes all objects and text outside the page (or margins)?
Unfortunately in my Indi CS6 any pasteboard and spread item is "instance of spread".
So i consider geometrical bounds:
myDocument = app.activeDocument
cur_Ruler = myDocument.viewPreferences.rulerOrigin;
with(myDocument.viewPreferences){
rulerOrigin = RulerOrigin.spreadOrigin;}
myDocument.zeroPoint = [0,0];
aWidth = myDocument.documentPreferences.pageWidth*2+10;
var objs = app.documents[0].pageItems.everyItem().getElements();
while(obj=objs.pop()){
a_left = obj.geometricBounds[1];
a_right = obj.geometricBounds[3];
if(a_right <0 || a_left > aWidth){obj.remove()}
with(myDocument.viewPreferences){
rulerOrigin = cur_Ruler} //back to the RulerOrigin -
Script to delete expired or errored scheduled workbooks for Discoverer
Hi All,
Can any one pont me to find a script to delete all expired and Errored workbooks in Database for discoverer?
Appreciate all your assistance.
Thankks
-SHi Asim,
I don't think you can share the results of the scheduled workbook using Desktop. As for Plus, when you're signed on as the other user are you in the same database & eul and are you looking for "scheduled workbooks"?
Brent -
Deleting Mail Attachments doesn't reduce email size
Trying to keep my mailbox size down by deleting attachments. Attachments all show as deleted but the email sizes do not change. Quite odd that an email with no attachments should show as 25mb! Any ideas? Apple Mail 7.3, Mavericks 10.9.3
Yes - the principal is: if you need to keep an attachment, store it in the relevant place e.g. pictures folder, documents, movies, icloud etc. Don't keep large attachments in the email system.
Also applies to 'Sent' items. Except where forwarding an attachment from someone else, you will always have the original item on your hard drive so keeping it in email sent items is completely pointless.
Once deleted, mail leaves a small text item detailing what the attachment was so you still have a record of what was sent / received.
You can also delete all attachments in an entire mailbox - bit risky tho'.
Where I had an issue was missing attachments in long threads - easily done. Thought I had selected all messages in a thread and deleted all attachments but missed some.
One tip, you might find it easier to view the messages / attachments in 'Classic' view. Go to Mail>Preferences>Viewing and select 'Classic Layout'. Once in, right click the menu bar to customise if necessary and add 'size' 'attachments' and whatever else to the strip above the message list. You can then easily sort by size.
happy shrinking! -
Using Powershell to delete all users from the Portal
Summary
This script will delete all users from the Portal except for Administrator and the Built-In Sync account.
Based on Markus's "Delete a User" script.
Useful when developing your system if you want to quickly clear out the data and start again.
set-variable -name URI -value "http://localhost:5725/resourcemanagementservice' " -option constant
function DeleteObject
PARAM($objectType, $objectId)
END
$importObject = New-Object Microsoft.ResourceManagement.Automation.ObjectModel.ImportObject
$importObject.ObjectType = $objectType
$importObject.TargetObjectIdentifier = $objectId
$importObject.SourceObjectIdentifier = $objectId
$importObject.State = 2
$importObject | Import-FIMConfig -uri $URI
if(@(get-pssnapin | where-object {$_.Name -eq "FIMAutomation"} ).count -eq 0) {add-pssnapin FIMAutomation}
$allobjects = export-fimconfig -uri $URI `
–onlyBaseResources `
-customconfig "/Person"
$allobjects | Foreach-Object {
$displayName = $_.ResourceManagementObject.ResourceManagementAttributes | `
Where-Object {$_.AttributeName -eq "DisplayName"}
if([string]::Compare($displayName.Value, "Administrator", $True) -eq 0)
{write-host "Administrator NOT deleted"}
elseif([string]::Compare($displayName.Value, "Built-in Synchronization Account", $True) -eq 0)
{write-host "Built-in Synchronization Account NOT deleted"}
else {
$objectId = (($_.ResourceManagementObject.ObjectIdentifier).split(":"))[2]
DeleteObject -objectType "Person" `
-objectId $objectId
write-host "`nObject deleted`n" $displayName.Value }
Go to the FIM ScriptBox
http://www.wapshere.com/missmiisThe DeleteObject function opens and closes a connection for each object. This approach is faster:
http://social.technet.microsoft.com/wiki/contents/articles/23570.how-to-use-powershell-to-delete-fim-users-that-have-a-null-attribute-name.aspx
Mike Crowley | MVP
My Blog --
Planet Technologies -
Apple script to delete user home folder
I wish to run a appple script to delete all user home folders except for ladmin which is an admin account. All other user home folders need to go. Any one have a script that can do this by using ARD
Account information is kept in NetInfo, a complex system database. If you just delete a home folder the account will still exist, and a new home folder will be created the next time a user logs into it.
-
How to delete all email attachments to free up space?
I'm on a MBP with a 240 GB SSD. Somehow my Mail folder is 90 GB!
I'd like to have an expert tell me how to go about deleting all of the attachments from my SSD so that I can free up space.
My set up is several work email accounts, and one personal email account, on Mail.app, all IMAP via Google Apps and Gmail.
I found this, and tried it, but only freed up 4 GB, which doesn't make sense to me???
http://lifehacker.com/5841097/how-to-delete-or-archive-attachments-in-apple-mail -and-free-up-disk-space
Thanks!Could you break this down for me more specifically? Hit menu after I've gotten into my email? I don't see delete in the menu (only the box to the left of the actual email itself). Thanks for any help!!
Maybe you are looking for
-
My outlook 2011 keeps saying error message and closing
My outlook said the cache was full, so I went in and followed the steps it said to sync to my work system. Now my outlook will open up and shut down within about 10 seconds of opening with the error message of "Microsoft outlook must be closed becaus
-
Hi all. SM 4.0->Service Desk Question: For processing message from end user side his must make correction or reply to message processor. To implement this I must create duplicate users in SOLMAN? And end user enter into SOLMAN under duplicate user an
-
When is the next update comming out for gta3
Plz help me
-
My tabs just keep making themselves new windows, why?
When I open a new tab and lets say I go on a website, my tab just makes itself a new window. I don't want the tab to make itself a new window and it can get really annoying PLEASE HELP ME! Thanks
-
Just installed Photoshop CC and it will not update
Just installed CC on a new machine and it will not update, says failed with a 49 at the end of the message, tried restarting and that did not help. Did get lightroom to install and update without any problems.