Created
December 1, 2020 08:54
-
-
Save MarshySwamp/0cd2bcbff88297f2f122a54f6d87e0d5 to your computer and use it in GitHub Desktop.
Open an entire folder of images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* open an entire folder */ | |
| // Open the input folder | |
| var inputFolder = Folder.selectDialog('Please select a folder:'); | |
| // Only open listed file extensions | |
| var inputFiles = inputFolder.getFiles(/\.(jpg|jpeg|tif|tiff|psd|psb|eps|png|bmp|gif)$/i); | |
| // Alpha numeric sort | |
| inputFiles.sort(); | |
| // inputFiles.sort.reverse(); | |
| // Loop through the inFolder... | |
| for (var i = 0; i < inputFiles.length; i++) { | |
| var openFiles = app.open(File(inputFiles[i])); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment