Created
April 4, 2022 01:12
-
-
Save MarshySwamp/36dca13f91c1fc0ad189be6db4120f9f to your computer and use it in GitHub Desktop.
Counter for saved files
This file contains 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
/* Add an incremental counter to report on the count of files saved */ | |
// Set the file save counter (outside the for loop...) | |
var counter = 0; | |
// fileList not included in this example | |
for (var i = 0; i < fileList.length; i++) { | |
var doc = open(fileList[i]); | |
// Do stuff...including file saving etc | |
// Increment the file save counter (end of the for loop) | |
counter++; | |
} | |
// End of script notification | |
alert('Script completed!' + '\r' + counter + ' files saved to:' + '\r' + saveFolder.fsName); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment