- Registriert
- 05.01.08
- Beiträge
- 66
Hallo,
Ich versuche gerade, das "Put this where i want it" Skript
Quelle: http://dougscripts.com/itunes/scripts/ss.php?sp=putthiswhereiwantit
dahingehend umzuschreiben, dass die exportierten Dateien als Präfix die Nummer innerhalb der Playlist (im Skript die variable "tc") erhalten.
Ich scheitere jedoch am umbenennen der Dateien (im Skript markiert mit ---???? )
Kann mir jemand helfen und mir sagen was ich an der Stelle am besten einfüge ?
Wie greife ich hier auf die NEU erstellte Datei im Ordner new_site zu ?
Danke im vorraus
Lutzifer
Ich versuche gerade, das "Put this where i want it" Skript
Quelle: http://dougscripts.com/itunes/scripts/ss.php?sp=putthiswhereiwantit
dahingehend umzuschreiben, dass die exportierten Dateien als Präfix die Nummer innerhalb der Playlist (im Skript die variable "tc") erhalten.
Ich scheitere jedoch am umbenennen der Dateien (im Skript markiert mit ---???? )
Kann mir jemand helfen und mir sagen was ich an der Stelle am besten einfüge ?
Wie greife ich hier auf die NEU erstellte Datei im Ordner new_site zu ?
Danke im vorraus
Lutzifer
Code:
global tc
tell application "iTunes"
if selection is not {} then
set sel to a reference to selection
set choose_folder_prompt to ("Select a folder to copy the selected tracks to...")
set new_site to (choose folder with prompt choose_folder_prompt)
if new_site is not false then
set tc to 0
with timeout of 30000 seconds
repeat with f in sel
if f's class is file track then
set fpath to (get f's location)
tell me to move_it(fpath, new_site)
end if -- skip if incorrect type of track
end repeat
end timeout
end if -- cancel from choose folder
else
display dialog fpath buttons {"Cancel"} default button 1 with icon 0
end if -- no selection
end tell
to move_it(fpath, new_site)
tell application "Finder"
try
duplicate file fpath to folder new_site with replacing
set newName to (tc & (name of file fpath)) as Unicode text
-- ?????
set tc to tc + 1
on error eM number eN
display dialog "Error " & eN & return & eM with icon 2
end try
end tell
end move_it