• Apfeltalk ändert einen Teil seiner Allgemeinen Geschäftsbedingungen (AGB), das Löschen von Useraccounts betreffend.
    Näheres könnt Ihr hier nachlesen: AGB-Änderung
  • Viele hassen ihn, manche schwören auf ihn, wir aber möchten unbedingt sehen, welche Bilder Ihr vor Eurem geistigen Auge bzw. vor der Linse Eures iPhone oder iPad sehen könnt, wenn Ihr dieses Wort hört oder lest. Macht mit und beteiligt Euch an unserem Frühjahrsputz ---> Klick

iTunes Dateien in der Playlist durchnummerieren

  • Ersteller Acronis
  • Erstellt am

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 
[email protected]

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
 

derbrocken27

Wohlschmecker aus Vierlanden
Registriert
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