Can anyone help me out with this "simple" loop.
I want the user to submit one or more files and I want to apply Filestatistics on everyone of them.
Thanks
Ariel
loop through job folder (more than one file)
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
loop through job folder (more than one file)
This is how I loop through a job folder.
// Check if job folder or a job file
if(!job.isFolder()) s.log(3, 'Job must be an assembled folder.');
// Loop through job folder to create component string
var dir = new Dir(job.getPath());
var jobs = dir.entryList("*", Dir.Files);
// Start job folder loop
for(var i = 0; i < jobs.length; i++){
// Log the job name of what was found
s.log(-1, jobs);
}
// Check if job folder or a job file
if(!job.isFolder()) s.log(3, 'Job must be an assembled folder.');
// Loop through job folder to create component string
var dir = new Dir(job.getPath());
var jobs = dir.entryList("*", Dir.Files);
// Start job folder loop
for(var i = 0; i < jobs.length; i++){
// Log the job name of what was found
s.log(-1, jobs);
}
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
loop through job folder (more than one file)
Gabriel: What would I do without you:)
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
loop through job folder (more than one file)
what do I have to do on a MAC (talking about the fixture). Can I give the Download Folder for example as the job folder (it gives the error: 11/17/14 16:42,Error,Scripter control,,,,,Can't copy file '/Users/ArielMAC/Downloads')
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
loop through job folder (more than one file)
all good - The download folder is the only one that is not working