How to select all linked files via script
Copy link to clipboard
Copied
Does the script or action delete all linked files that are placed?
Explore related tutorials & articles
Copy link to clipboard
Copied
There are advertisements in the placed files, because there are a lot of such files to be processed, I want to delete all the placed files, is there a good way?
Copy link to clipboard
Copied
do you know how to select them by hand? it's as easy as running a script
- open the Links panel
- select all links
- click on the Go To Link button
Copy link to clipboard
Copied
I know this, but, I have hundreds of files and it's too slow to do it manually!
Copy link to clipboard
Copied
Use the script to select all the placed files, create an action to delete all the placed files with one click
Copy link to clipboard
Copied
edit the script that m1b wrote for you, instead of deleting a linked file by name, delete them all. Remove the condition that checks the name of the link
if (
doc.placedItems[j].file.name == name
&& ++count
)
and if you don't want the alert (the popup window) remove this line as well
alert('Removed ' + count + ' placed items of "' + removeThis + '".')
Copy link to clipboard
Copied
I don't know anything about scripting languages, can you give me a complete code example
Copy link to clipboard
Copied
Hi @Brother Li, you could achieve this with a small modification of my answer to your other question.
Just change this line (in two places in script):
if (itemName == name) {
to this:
if (true) {
It will remove all placedItems and also rasterItems with link information.
- Mark
Copy link to clipboard
Copied
hi @Brother Li
try:
app.activeDocument.placedItems.removeAll();
app.activeDocument.rasterItems.removeAll();
works for me

