script counts the number of files and folders in a select folder.

Rafol

Registered
Hi guys,
i have this script:

now my question is how can i replace the "choose folder" into fixed folder?

Thanks,
Rafi

tell application "Finder"
set chosen_folder to choose folder
set folder_name to name of chosen_folder
count every file in folder chosen_folder
set file_total to result
count every folder in folder chosen_folder
set folder_total to result
set the_total to (file_total + folder_total)
if the_total = 88 then
else
display dialog "There are " & file_total & " files and " & folder_total & " folders in the folder." & return & ¬
"Total items equals " & the_total & " but expected to be 88 files - error on test"
end if
end tell
 
Back
Top