hi guys
I am new to applescript and need your help.
I got this error message
Finder got an error: Can’t get every folder of entire contents of folder “pasu-ks-ibook-g4:Users:administrator:Desktop:test2:Jobs” whose name contains “Fonts”.
I checked my code but can not find any syntax or local error.
my code is listed below:
set bFolder to “pasu-ks-ibook-g4:Users:administrator:Desktop:test2:Jobs”
tell application “Finder”
set sFolders to every folder of entire contents of folder bFolder whose name contains “Fonts”
repeat with i in sFolders
set tName to my clean_Path((name of i) as string)
do shell script ("cd " & (my clean_Path(POSIX path of ((parent of i) as string))) & "; zip -r " & tName & " " & tName)
end repeat
end tell
on clean_Path(local_String) – Performs a limited UNIX compliant folder path correction.
set {oAStid, AppleScript’s text item delimiters} to {AppleScript’s text item delimiters, " "}
set local_String to text items of local_String
set AppleScript’s text item delimiters to ((ASCII character 92) & " ")
set local_String to (local_String as string)
set AppleScript’s text item delimiters to oAStid
return (local_String)
end clean_Path