Jump to content

Copy Media Info from media file to text file. is this possible?


Devanos
 Share

Recommended Posts

Hi, i wonder if some of you guys could help me with this.

is it possible to create a script that reads and copys the info from a media file or any file for that matter. and outputs this info into a text file.

is this doable?

here is an example of what ifo i mean.

i would like to be able to write a script that copys this information from a file.

and writes it to a text file.

what should i look for. to achive this.

post-29391-1196341925_thumb.jpg

Edited by Devanos
Link to comment
Share on other sites

Hi, i wonder if some of you guys could help me with this.

is it possible to create a script that reads and copys the info from a media file or any file for that matter. and outputs this info into a text file.

is this doable?

here is an example of what ifo i mean.

i would like to be able to write a script that copys this information from a file.

and writes it to a text file.

what should i look for. to achive this.

Not fancy, but this may work as a starting point:

CODE

#include <Array.au3>

$objWMP = ObjCreate("WMPlayer.ocx")

$mediaFile = "D:\01.mp3"

$objFile = $objWMP.newMedia($mediaFile)

Dim $aFileInfo[11][2]

Dim $aCategories[11] = ["FileType","MediaType","FileSize","Artist","Album","Title","Duration","Bitrate","WM/Category","WM/Genre","WM/Year"]

For $i = 0 To UBound($aCategories) -1

$aFileInfo[$i][0] = $aCategories[$i]

$aFileInfo[$i][1] = _GetInfo($objFile,$aCategories[$i])

Next

_ArrayDisplay($aFileInfo)

Func _GetInfo($objFile,$dataField)

Return $objFile.GetItemInfo($dataField)

EndFunc

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...