Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duration of a WMV file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01539916
Message ID:
01539919
Views:
138
This message has been marked as the solution to the initial question of the thread.
>Hi All
>
>I need to get the video duration of any WMV video file.
>This is a recent requirement for a VP8 application.
>
>I have tried the whole morning using windows scripting and other methods but nothing seems to work as advertised.
>
>Any help will be greatly appreciated.
>
>TIA
>
>Max

Look at this code of Turkish Cetin Basoz. For the case of the duration of the WMV files takes the value of the column 27.
Clear
lcFile = GETFILE("WMV") &&  Try a different multimedia file extensions
loShell = Createobject("Shell.Application")
loFolder = loShell.Namespace(JUSTPATH(m.lcFile))
loItem = loFolder.ParseName(JUSTFNAME(m.lcFile))
If !Isnull(loItem)
  IF loItem.IsLink
    objLink = loItem.GetLink()
    ? "Link properties of shortcut:"
    ? "-------------------------------------"
    ? "Description:", objLink.Description
    ? "Path:", objLink.Path
    ? "Arguments:", objLink.Arguments
    ? "WorkingDirectory:", objLink.WorkingDirectory
    ? "-------------------------------------"
  else
    For ix= 0 To 34 && version based. win 7: 0 to 266. Property order differs too.
      ? "Column "+Str(m.ix,2)+": "+ ;
        loFolder.GetDetailsOf(loItem, m.ix)
    Endfor
  endif
Else
  ? "File doesn't exist"
Endif
Return
More info:
http://technet.microsoft.com/en-us/library/ee176615.aspx
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=160880&page=1
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform