Automatisch Ordner sortieren

kulturspiegel

kulturspiegel

Aktives Mitglied
Thread Starter
Dabei seit
04.04.2007
Beiträge
203
Reaktionspunkte
7
Hallo zusammen,

ich suche eine Möglichkeit, Ordner und deren Unterordner automatisch nach Dateitypen und Erstellungsdatum zu sortieren.

Beispiel:
850259-1440246098.png

Ich möchte aber nicht für jeden Ordner eine eigene Regel erstellen, es soll möglichst automatisiert passieren. Vielleicht gibt es eine fertige Regel, oder auch eine Mac App die mein Problem löst?

Danke und Grüße
kulturspiegel
 
So etwas erledigt bei mir Hazel.
 
Hallo,

mit diesem Skript kannst du einen Ordner auswählen und die Dateien in einer entsprechenden Struktur an einen vorher festgelegten Ort verschieben:
Code:
-- Dateitypen:
property documentExtensions : {"doc", "docx", "rtf", "pages", "txt"}
property movieExtensions : {"mov", "mpeg", "mkv", "mp4", "avi"}
property imageExtensions : {"jpg", "jpeg", "dng", "gif", "bmp", "png"}
-- Pfad an dem die Ordnerstruktur gespeichert werden soll:
property libraryPath : "/Users/Name/"

tell application "Finder"
    set theFolder to choose folder
    set theFiles to entire contents of theFolder
   
    repeat with aFile in theFiles
        set theExtension to name extension of aFile
       
        if theExtension is in documentExtensions then
            set theYear to year of (get creation date of aFile) as string
            set theMonth to month of (get creation date of aFile) as string
            do shell script "mkdir -p '" & libraryPath & theYear & "/" & theMonth & "/Dokumente/' && mv " & quoted form of (POSIX path of (get aFile as alias)) & " \"$_\""
        else if theExtension is in movieExtensions then
            set theYear to year of (get creation date of aFile) as string
            set theMonth to month of (get creation date of aFile) as string
            do shell script "mkdir -p '" & libraryPath & theYear & "/" & theMonth & "/Filme/' && mv " & quoted form of (POSIX path of (get aFile as alias)) & " \"$_\""
        else if theExtension is in imageExtensions then
            set theYear to year of (get creation date of aFile) as string
            set theMonth to month of (get creation date of aFile) as string
            do shell script "mkdir -p '" & libraryPath & theYear & "/" & theMonth & "/Bilder/' && mv " & quoted form of (POSIX path of (get aFile as alias)) & " \"$_\""
        end if
    end repeat
end tell

Die ersten Zeilen musst du natürlich entsprechend anpassen.
 
  • Gefällt mir
Reaktionen: kulturspiegel
Hallo zusammen,

danke für den Tipp! Hazel hat's gebracht!

LG
 
Zurück
Oben Unten