Skip to main content
Known Participant
October 15, 2022
Question

How to select all linked files via script

  • October 15, 2022
  • 4 replies
  • 767 views

Does the script or action delete all linked files that are placed?

This topic has been closed for replies.

4 replies

MidoSemsem
Inspiring
November 1, 2022

hi @Brother Li 
try:


app.activeDocument.placedItems.removeAll();
app.activeDocument.rasterItems.removeAll();


works for me

m1b
Community Expert
Community Expert
October 16, 2022

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

CarlosCanto
Community Expert
Community Expert
October 15, 2022

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

Known Participant
October 15, 2022

I know this, but, I have hundreds of files and it's too slow to do it manually!

Known Participant
October 15, 2022

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?