global anzahlFiles on run set anzahlFiles to 0 set theFileList to (choose folder) as list repeat with theFile in theFileList File_or_Folder(theFile) end repeat tell application "Finder" display dialog "CountEverest says: There are " & anzahlFiles & " files inside." buttons {"OK"} default button {"OK"} end tell end run on open theFileList set anzahlFiles to 0 repeat with theFile in theFileList File_or_Folder(theFile) end repeat tell application "Finder" display dialog "CountEverest says: There are " & anzahlFiles & " files inside." buttons {"OK"} default button {"OK"} giving up after 20 end tell end open on File_or_Folder(theFile) set theInfo to info for theFile if folder of theInfo then tell application "Finder" set FolderList to every item of theFile end tell repeat with theFolder in FolderList set theFolder to theFolder as alias my File_or_Folder(theFolder) end repeat else ProcessIt(theFile) end if end File_or_Folder on ProcessIt(theFile) set anzahlFiles to anzahlFiles + 1 end ProcessIt