1. Diese Seite verwendet Cookies. Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies. Weitere Informationen

iTunes Dateien in der Playlist durchnummerieren

Dieses Thema im Forum "iTunes (Mac only!)" wurde erstellt von Acronis, 16.11.06.

  1. Acronis

    Acronis Gast

    Hallo,

    das untenstehende Script kann die Songnamen durchnummerieren, aber ich hätte gerne, dass er den Dateinamen durchnummeriert.

    Was muss ich im Script ändern?

    Danke für Antworten!

    Code:
    (* "Number Tracks of Playlist" for iTunes 2 
    written by Doug Adams 
    dougadams@mac.com
    
    Get more free AppleScripts and info on writing your own
    at Doug's AppleScripts for iTunes and SoundJam
    http://www.malcolmadams.com/itunes/ *)
    -------------------------------------
    global thePlaylist, extra_blurb, extra_blurb
    (*
    The text between quotes in
    the line below is what appears
    between the number of the track
    and the actual title.
    If you like, you may change 
    the character within quotes below
    to another separator .
    If you want no separator, leave the quotes
    empty, like so: ""
    Then just  "Save" the script.
    *)
    
    set separator to "."
    --------------------------------------
    
    tell application "iTunes"
        set thePlaylist to (get view of front window)
        set first_track to 1
        
        set extra_blurb to "selected Playlist:"
        copy (my setFirstNum()) to trackOffset
        
        --go for it
        --initialize counters and figgerin' stuff
        set last_track to (get index of last track of thePlaylist)
        copy (last_track + trackOffset) as string to last_digit
        set len_last_digit to (get count of characters of last_digit)
        
        repeat with i from first_track to last_track
            --pad with zeroes
            set zeroStr to ((i + trackOffset) as string)
            repeat while length of zeroStr is less than len_last_digit
                copy "0" & zeroStr to zeroStr
            end repeat
            set name of track i of thePlaylist to zeroStr & separator & (get name of track i of thePlaylist as string)
        end repeat
        --    display dialog "Finished!" buttons {"Thanks"} default button 1 with icon 1
        
        (* You can put this line back in, but if you do, it may cause a delay in re-drawing the iTunes screen in OS X.
        This is a known issue *)
    end tell
    
    on setFirstNum()
        try
            copy (text returned of (display dialog "Number every track of the " & extra_blurb & return & return & ¬
                "  " & "\"" & (get name of thePlaylist as string) & "\"" & return & return & ¬
                "starting with the number:" default answer "1") as number) - 1 to trackOffset
        on error
            my setFirstNum()
        end try
        
    end setFirstNum
     
  2. derbrocken27

    derbrocken27 Wohlschmecker aus Vierlanden

    Dabei seit:
    05.11.05
    Beiträge:
    234
    Du willst also die Datei auf dr Festplatte umbenennen? Für die Dose gibts Joe for free, für den Mac wird google doch auch was finden? Denke du solltest nach einem tool, nicht nach einem iTunes-Script suchen.

    Gruß
    Jan
     

Diese Seite empfehlen