• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get length of audio/video files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get length of audio/video files


  • Subject: Re: Get length of audio/video files
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 26 Oct 2011 09:21:39 -0500

Since we're mentioning alternatives let's not forget 'mdls':

try
   tell application "Finder"
      set sel to selection as alias list
      if sel ≠ {} then
         set fSel to first item of sel
      end if
   end tell

   

   set fSel to quoted form of (POSIX path of fSel)

   

   set cmd to "mdls " & fSel
   do shell script cmd

   

on error errMsg number errNum
   set {cr, sep} to {return, "------------------------------------------"}
   set e to sep & cr & "Error: " & errMsg & cr & sep & cr & "Error Number: " & errNum & cr & sep
   beep
   display dialog e
end try

It provides pretty good info for filetypes it understands.  It doesn't seem to particularly like .flv files, but that's all I know off offhand.

--
Best Regards,
Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >RE: Re: (no subject)That (From: email@hidden)
 >Re: (no subject)Thatinteract with alerts (From: Dana Hill <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Shane Stanley <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Alex Zavatone <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Shane Stanley <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Alex Zavatone <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Shane Stanley <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Alex Zavatone <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Shane Stanley <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: email@hidden)
 >Get length of audio/video files (From: Bob Majors <email@hidden>)
 >Re: Get length of audio/video files (From: Christopher Stone <email@hidden>)
 >Re: Get length of audio/video files (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Get length of audio/video files
  • Next by Date: Re: Get length of audio/video files
  • Previous by thread: Re: Get length of audio/video files
  • Next by thread: Re: Get length of audio/video files
  • Index(es):
    • Date
    • Thread