How to handle data from mp3-files
Posted: Sun Dec 19, 2021 5:51 pm
Hi All,
I came across a very versatile tool developed by the late Mark Smith, called id3lib.
When I use this tool while gathering info about more than one mp3-files the output is not adequate: only the data of the first mp3-file is presented. I tried the following script:
on mouseUp
set the itemDelimiter to slash
put item 1 to -2 of the effective filename of this stack into stdFolder
set the defaultFolder to stdFolder & "/" & "MyFiles"
put the files into theFiles
filter theFiles with "*[.mp3]"
set defaultFolder to stdFolder
start using stack "id3lib"
repeat for each line K in theFiles
id3_setFile ("MyFiles" & "/" & K)
set the clipboardData["rtf"] to id3_getArtist() & tab & id3_getTitle() & tab & id3_getAlbum() & tab & id3_getYear()
put the clipboardData & cr after tData
end repeat
delete last char in tData
put tData into fld 1
end mouseUp
How can I get the info of all the files in MyFiles?
Kind Regards,
JanVledder
I came across a very versatile tool developed by the late Mark Smith, called id3lib.
When I use this tool while gathering info about more than one mp3-files the output is not adequate: only the data of the first mp3-file is presented. I tried the following script:
on mouseUp
set the itemDelimiter to slash
put item 1 to -2 of the effective filename of this stack into stdFolder
set the defaultFolder to stdFolder & "/" & "MyFiles"
put the files into theFiles
filter theFiles with "*[.mp3]"
set defaultFolder to stdFolder
start using stack "id3lib"
repeat for each line K in theFiles
id3_setFile ("MyFiles" & "/" & K)
set the clipboardData["rtf"] to id3_getArtist() & tab & id3_getTitle() & tab & id3_getAlbum() & tab & id3_getYear()
put the clipboardData & cr after tData
end repeat
delete last char in tData
put tData into fld 1
end mouseUp
How can I get the info of all the files in MyFiles?
Kind Regards,
JanVledder