on Preflight_Images()
set myFiles to {}
tell application "Finder"
set myFiles to myFiles & every file of the_Preflight_WEBSHOP_subfolder
set myFiles to myFiles & every file of the_Preflight_IMAGEBANK_subfolder
end tell
set number_of_files to (count of myFiles)
set First_File_sizes to {}
-- repeat with aFile in my myFiles: Execution error!!!
repeat with aFile in myFiles
tell application "Finder"
set size_of_a_file to size of aFile
end tell
set the end of First_File_sizes to size_of_a_file -- create list of file sizes
end repeat
delay 5 -- stabilize time
set Stabilized_Files to {}
repeat with counter from 1 to number_of_files
-- set aFile to item counter of my myFiles: Execution error!!!
set aFile to item counter of myFiles
tell application "Finder"
set size_of_a_file to size of aFile
end tell
if size_of_a_file = item counter of First_File_sizes then
set the end of Stabilized_Files to item counter of myFiles
end if
end repeat
-- further processing
end Preflight_Images