PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

Change File Properties for Music Folder

 
 
Randy
Guest
Posts: n/a
 
      13th Dec 2010
This is just a quick algorithm for something that I am about to write:

Dim ActiveFolder as string
Dim fFileName as file '??
Dim strArtist as string
Dim strAlbum as string
Dim strTitle as string

For each fFileName in ActiveFolder
'Replace Contributing Artist with strArtist
'Replace Album with strAlbum
'Replace Title with strTitle
Next

Does anybody know what the code is for the three lines that begin with
Replace inside the loop?

Also, what is the variable type for fFileName?

Thanks,
Randy
 
Reply With Quote
 
 
 
 
Onur Güzel
Guest
Posts: n/a
 
      13th Dec 2010
On Dec 13, 7:10*pm, Randy <spam.eastl...@gmail.com> wrote:
> This is just a quick algorithm for something that I am about to write:
>
> Dim ActiveFolder as string
> Dim fFileName as file '??
> Dim strArtist as string
> Dim strAlbum as string
> Dim strTitle as string
>
> For each fFileName in ActiveFolder
> * *'Replace Contributing Artist with strArtist
> * *'Replace Album with strAlbum
> * *'Replace Title with strTitle
> Next
>
> Does anybody know what the code is for the three lines that begin with
> Replace inside the loop?
>
> Also, what is the variable type for fFileName?
>
> Thanks,
> Randy


Actually, you're just trying to modify the metadata attributes of a
media file, highly possible as an Windows Media File, such as WMA. In
case of this, you need to deal with some API like Windows Media Player
or Windows Media SDK. Changing such attributes of a music file can be
done using Windows Media Player control which can be added to your
toolbox. A similar solution, i had posted here:

http://groups.google.com/group/micro...811f28ca0ee7a7

Me.AxWindowsMediaPlayer1.mediaCollection.add _
("c:\file.wmv").setItemInfo("Title", "title_here")

A list of these attributes can be found here:
http://msdn.microsoft.com/en-us/library/dd743066(v=vs.85).aspx

Once you use the API, you're ready to change attributes in / or out of
a loop.

HTH,

Onur Güzel
 
Reply With Quote
 
Randy
Guest
Posts: n/a
 
      13th Dec 2010
You are right. However, I am trying to write a program so that this
can be done en masse to entire folders. I have a number of mp3 files
from business meetings that I am trying to organize, but the Windows
Explorer and WMP interfaces are painfully slow. I have to open the
properties of each file one by one and type in the changes to the
metadata attributes individually and over and over again. I'm sure
that this can be done programatically, but I don't know what the code
would be to get at these attribute entries.
 
Reply With Quote
 
Onur Güzel
Guest
Posts: n/a
 
      13th Dec 2010
On Dec 13, 7:44*pm, Randy <spam.eastl...@gmail.com> wrote:
> You are right. *However, I am trying to write a program so that this
> can be done en masse to entire folders. *I have a number of mp3 files
> from business meetings that I am trying to organize, but the Windows
> Explorer and WMP interfaces are painfully slow. *I have to open the
> properties of each file one by one and type in the changes to the
> metadata attributes individually and over and over again. *I'm sure
> that this can be done programatically, but I don't know what the code
> would be to get at these attribute entries.


As stated, once you've added right WMP SDK (like WMP control) you're
allowed to change these attributes programatically. Changing title is
done like in the example in my previous post.

Loooping through the files is simple as using System.IO.File.GetFiles
method.

A design hint: You would load the file paths in a listbox/listview
than select files and get attributes using GetItemInfo, load
attributes to a corresponding textboxes to let client edit in a new
form. Put a save button on that form (edit form), use setItemInfo to
save in save button's click event handler.

Design 'may' vary depending on your project.

HTH,

Onur

 
Reply With Quote
 
Randy
Guest
Posts: n/a
 
      13th Dec 2010
Thanks, Onur!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Music file properties have disappeared in Windows Explorer Jaz Windows XP General 2 4th Jul 2010 04:48 PM
Music file properties have disappeared in Windows Explorer Jaz Windows XP General 21 17th Jan 2007 11:58 AM
Music file properties disappeared in Windows Explorer Jaz Windows XP Music 3 3rd Jan 2007 09:44 PM
File/folder properties cannot change from "Read Only" =?Utf-8?B?cXVpbHRrYXRoeQ==?= Windows XP General 5 2nd May 2006 01:03 AM
can't change file and folder properties stan Windows XP Performance 1 26th Dec 2003 11:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:28 PM.