Script to Open Multiple Docs from a Text File
I'm having problems scripting the opening of multiple files from a text file source.
Example text file:
~/Desktop/files.log
~/Desktop/theFolder/theFile001.jpg
~/Desktop/theFolder/theFile002.jpg
There could be 1, 2 or more items to loop over in the log file.
The following code opens the first file:
var logFile = File("~/Desktop/files.log");
logFile.open('r');
var filePath = logFile.readln();
logFile.close();
alert(filePath);
open(File(filePath));
However, I am having problems making it loop over each separate line in the log file to open all files (I have tried many different things without success). Can somebody please help me to open each line in the log file as a separate file? I would have thought that this would be a "common enough" request, however, I couldn't find anything that I could use.

