Does anyone have a script that will take a group of QT movies. Extract the file,title, and duration and import the data into a text file?
Any help would be much appreciated.
Thanks
Does anyone have a script that will take a group of QT movies. Extract the file,title, and duration and import the data into a text file?
Any help would be much appreciated.
Thanks
Try this, it should a file on your desktop called “Duration Log”
set Movie_s to choose file with multiple selections allowed without invisibles
set the duration_log to (path to desktop folder) & "Duration Log" as string
set open_duration_log to open for access the duration_log with write permission
set eof of the open_duration_log to 0
close access the open_duration_log
repeat with m_ovie in Movie_s
set m_ovie to m_ovie as string
tell application "System Events"
tell QuickTime file m_ovie
set keyfileduration to duration / time scale
set n_ame to name
set the time_scale to the time scale
set the movie_duration to the duration
set the h_ours to (((movie_duration / time_scale) div 60) div 60) as string
end tell
end tell
if h_ours is "0" then
set h_ours to "00"
end if
set m_inutes to (((movie_duration / time_scale) div 60) - 60) as string
if m_inutes < "0" then
set m_inutes to ((movie_duration / time_scale) div 60) as string
end if
set count_minutes to count characters of m_inutes
if count_minutes is 1 then
set m_inutes to "0" & m_inutes as string
end if
set s_econds to (((((movie_duration / time_scale / 60) - ((movie_duration / time_scale) div 60)) * 60) * 10 div 10) as string)
set count_seconds to count characters of s_econds
if count_seconds is 1 then
set s_econds to "0" & s_econds as string
end if
set movie_length to h_ours & ":" & m_inutes & ":" & s_econds as string
set open_duration_log to open for access the duration_log with write permission
write n_ame & "
Duration: " & movie_length & "
" to the open_duration_log starting at eof
close access the open_duration_log
end repeat
set duration_log to duration_log as alias
tell application "Finder"
open duration_log
end tell
You Rock! This worked like a charm. Thank You so much.