Copy link to clipboard
Copied
I have a .txt file with a list of 350 images, which I have to select in a folder with more than 2500 images.
Is there any way, using this list to automatically make that selection, without having to manually select one by one?
Thanks in advance
Copy link to clipboard
Copied
Yes, this is possible.
(Option 1) The easiest solution is via a script... I can't find the original topic thread, however below is the script. By the date of the file, I am guessing that credit for the script would go to either SuperMerlin or Lumigraphics (AKA: The Usual Suspects):
// https://forums.adobe.com/thread/2632510
// help filtering a folder of images based off a list of file names
/*
Yes this can be done in Adobe Bridge with the following script...
To install copy the code into a PLAIN TEXT editor and save it out with a .jsx extension to the correct folder.
The correct folder can be found by going to the Preferences - Startup Scripts and click "Reveal My Startup Scripts"
This will open the folder where the script is to be saved.
Close and restart Bridge then accept the new script.
To use: Tools - Files to Collection, it will then prompt for a text file (one line per filename)
It will then try to find the files in the selected folder and create a Collection that it will switch to when completed.
An error log with any files it can't find will be created on the desktop.
*/
#target bridge
if (BridgeTalk.appName == "bridge") {
var FtoC = new MenuElement("command", "Files to Collection", "at the end of Tools");
}
FtoC.onSelect = function () {
folder = Folder(app.document.thumbnail.path);
if (!folder.exists) {
alert("You are not in a valid folder. Is this a collection?");
return;
}
var txtFile = File.openDialog("Please select the text file");
if (txtFile == null) return;
var fList = new Array();
txtFile.open("r");
var data = txtFile.read().split("\n");
txtFile.close();
for (var a in data) {
if (data[a].length < 4) continue;
fList.push(data[a].replace(/^\s+|\s+$/g, ''));
}
data = [];
thumbList = [];
for (var z in fList) {
if (!File(folder + "/" + fList[z]).exists) {
log(decodeURI(folder + "/" + fList[z]) + " does not exist");
} else {
thumbList.push(new Thumbnail(File(folder + "/" + fList[z])));
}
}
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var toDay = new XMPDateTime(new Date()).toString().match(/^.{10}/);
collection(decodeURI(toDay), thumbList);
function collection(name, thumbList) {
if (thumbList.length > 0) {
var Col = app.createCollection(name);
app.addCollectionMember(Col, thumbList);
app.document.thumbnail = Col;
}
}
function log(s) {
var errLog = File(Folder.desktop + "/ErrorLog.txt");
errLog.open("a");
errLog.writeln(s);
errLog.close();
}
};
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Just have the text file in the same folder as the 2500 images. Each separate line of the text file should have the image name, such as:
Image 1.jpg
My second image.psd
And_another-file.png
Once the script has created the collection, you could select all and then apply a rating, keyword or other metadata to help isolate the files outside of the collection.
_______
(Option 2) You can convert the existing text file into an .xml file to create a Collection or Smart Collection file and move it to the appropriate folder. This takes a little bit of of work, so keep this in mind as a fallback solution.
https://community.adobe.com/t5/bridge/transfering-collections/m-p/9687219?page=1
https://community.adobe.com/t5/bridge/how-to-add-to-an-existing-collection/m-p/9747051?page=1
Copy link to clipboard
Copied
Yep a script would be the best way.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more