set chemin to choose folder with prompt "la cle"
tell application "Finder"
set cle to chemin as string
set chemin to quoted form of POSIX path of chemin
set longueur to count characters of chemin
set chemin to text -longueur thru -3 of chemin & "'"
set liste1 to "._*,.background,.com.apple.timemachine.supported,.DS_Store,.fseventsd,.localized,.Spotlight-V100,.Trashes,'Desktop DB','Desktop DF',Thumbs.db"
set AppleScript's text item delimiters to (ASCII character 44)
set toutes_les_lignes to (every text item of liste1) as list
set AppleScript's text item delimiters to ""
repeat with une_ligne in toutes_les_lignes
set lefichier to do shell script "find " & chemin & " -iname " & une_ligne
if lefichier = "" then
else
set AppleScript's text item delimiters to (ASCII character 13)
set fichiersTrouves to (every text item of lefichier) as list
set AppleScript's text item delimiters to ""
set nb to count item of fichiersTrouves
repeat with i from 1 to nb
set lefichier to quoted form of text item i of fichiersTrouves
set efface to "rm -rf " & lefichier
do shell script efface
end repeat
end if
end repeat
eject cle
end tell