Hi all:
I’ve written a script which loops through a folder and it works fine. However, when I display the items (see script below - they are all folders) it appears that though AS is sequencing through the folders it is not doing so alphabetically or by date created or modified. Was just curious why this is so and if there is a fix one could do to loop through the items alphabetically.
Thanks
Steve
set thePath to the folder "merion_image_archive" of folder "Cumulus_Test" of folder "WebDesign" of disk "WWW"
set theFileCount to (count of every item of thePath) sort by name
repeat with i from 1 to theFileCount
set fileType to file type of item i of thePath
if fileType = "fold" then
set itemNum to i as string
display dialog itemNum & return & name of item i of thePath & return & (count of every item of item i of thePath)
set folderItemCount to count of every item of item i of thePath
if folderItemCount > 0 then
set folderItemCount to count of every item of item i of thePath
end if
end if
end repeat