Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ processFolder(input);

// function to scan folders/subfolders/files to find files with correct suffix
function processFolder(input) {
if(endsWith(input, "/")) input = substring(input, 0, (lengthOf(input)-1));
if(!endsWith(input, "/") | !endsWith(input,"\\")) input = input + File.separator;
list = getFileList(input);
list = Array.sort(list);
for (i = 0; i < list.length; i++) {
if(File.isDirectory(input + File.separator + list[i]))
processFolder(input + File.separator + list[i]);
if(File.isDirectory(input + list[i]))
processFolder(input + list[i]);
if(endsWith(list[i], suffix))
processFile(input, output, list[i]);
}
Expand All @@ -26,6 +28,6 @@ function processFolder(input) {
function processFile(input, output, file) {
// Do the processing here by adding your own code.
// Leave the print statements until things work, then remove them.
print("Processing: " + input + File.separator + file);
print("Processing: " + input + file);
print("Saving to: " + output);
}