2 votes

AppleScript pour supprimer un dossier

Je me demandais si quelqu'un pouvait me donner des conseils sur la façon dont je peux utiliser le script d'apple pour supprimer ce dossier ?

Users/user1/Library/Application Support/Skype/tankitan

5voto

grg Points 181593
tell application "Finder" to delete ((POSIX file "/Users/user1/Library/Application Support/Skype/tankitan") as alias)

-2voto

mark stewart Points 133

Peut-être que ce script efface tous les crochets 'tankitan' tout en gérant un (des) crochet(s) externe(s) spécifique(s), pour un certain utilisateur1 ou nom d'utilisateur(s).

(* Ashley Rhodes https://mrashrhodes.wordpress.com/2015/03/18/simple-delete-files-and-folders-script-applescript/ *)
tell application "System Events"
    set deleted to POSIX file "/Users/username/Library/Caches/"
    tell application "Finder"
        delete (files of folder deleted)
        delete (folders of folder deleted)
    end tell
    set deleted to POSIX file "/Users/username/Library/Cookies/"
    tell application "Finder"
        delete (files of folder deleted)
        delete (folders of folder deleted)
    end tell
    set deleted to POSIX file "/Users/username/Library/Saved Application State/"
    tell application "Finder"
        delete (files of folder deleted)
        delete (folders of folder deleted)
    end tell
    set deleted to POSIX file "Users/user1/Library/Application Support/Skype/tankitan"
    tell application "Finder"
        delete (files of folder deleted)
        delete (folders of folder deleted)
    end tell
end tell

Remarquez, même un Rhodes POSIX peut s'emmêler... Gestion de toile collante c/o Internet of Things

LesApples.com

LesApples est une communauté de Apple où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres utilisateurs d'appareils Apple, poser vos propres questions ou résoudre celles des autres.

Powered by:

X