- Jonathan
- Medlem ●
- Stockholm
- 2003-12-04 16:22
Jag har ett applescript här som sorterar dina hemladdade filer i undermappar beroende på filtyp. Den öppnar också "säkra" filer...
Skapa följande mappar i din hemladdat-mapp:
Arkiv
Bilder
Filmer
Installers
Ljud
Övrigt
PDFer
Skivavbilder
Du måste också byta ut "Macintosh HD:Users:jonathan:Desktop:Downloads" mot sökvägen till din hemladdat-mapp
J.
on adding folder items to this_folder after receiving added_items tell application "Finder" set folderLocationArkiv to "Macintosh HD:Users:jonathan:Desktop:Downloads:Arkiv:" set folderLocationBilder to "Macintosh HD:Users:jonathan:Desktop:Downloads:Bilder:" set folderLocationFilmer to "Macintosh HD:Users:jonathan:Desktop:Downloads:Filmer:" set folderLocationInstallers to "Macintosh HD:Users:jonathan:Desktop:Downloads:installers:" set folderLocationLjud to "Macintosh HD:Users:jonathan:Desktop:Downloads:Ljud:" set folderLocationMisc to "Macintosh HD:Users:jonathan:Desktop:Downloads:Övrigt:" set folderLocationPdf to "Macintosh HD:Users:jonathan:Desktop:Downloads:PDFer:" set folderLocationSkivavbild to "Macintosh HD:Users:jonathan:Desktop:Downloads:Skivavbilder:" set folderLocationTorrents to "Macintosh HD:Users:jonathan:Desktop:Downloads:Torrents:" repeat with aFile in added_items if the name extension of aFile is in {"jpg", "gif", "png", "pict", "tiff", "gif", "psd", "bmp"} then tell application "Finder" try move aFile to folder folderLocationBilder end try end tell tell application "Preview" open aFile end tell else if the name extension of aFile is in {"mov", "avi", "wmv", "mpg"} then tell application "Finder" try move aFile to folder folderLocationFilmer end try end tell else if the name extension of aFile is in {"pkg", "mpkg"} then tell application "Finder" try move aFile to folder folderLocationInstallers end try end tell else if the name extension of aFile is in {"mp3", "aiff", "aif", "wav", "au", "bwf", "m4a"} then tell application "Finder" try move aFile to folder folderLocationLjud end try end tell else if the name extension of aFile is in {"pdf"} then tell application "Finder" try move aFile to folder folderLocationPdf end try tell application "Preview" open aFile end tell end tell else if the name extension of aFile is in {"sit", "sitx", "tar", "tar.gz", "rar", "zip", "gz"} then tell application "Finder" try move aFile to folder folderLocationArkiv end try tell application "StuffIt Expander" open aFile end tell end tell else if the name extension of aFile is in {"dmg", "img", "iso", "toast"} then tell application "Finder" try move aFile to folder folderLocationSkivavbild end try tell application "Disk Utility" open aFile end tell end tell else tell application "Finder" try move aFile to folderLocationMisc end try end tell end if end repeat end tell end adding folder items to