Link to home
Create AccountLog in
Avatar of Ranger
RangerFlag for United States of America

asked on

Batch file to test for WMA protection

I have a ton of music files on my hard drive.  They all began their journey with me as a newly bought CD, but over the years they have migrated from hard drive to hard drive as I have bought and outlived new computers.  Now that I'm trying to organize this rats nest of music, I'm finding that a few of the .WMA files are protected and won't play.

What I would like to do is create a batch file that will check each file to see if it is protected.  If it is protected, the file would be moved into a "c:\protected\" folder so that I could then try to find the original music CD to replace the file with.  If it isn't protected, the file would be left alone.

Is this possible?  Please feel free to ask any clarifying questions and I'll post replies as soon as I can.

Thanks!
Avatar of SteveGTR
SteveGTR
Flag of United States of America image

Protected? What does that mean? How can that batch processing know that a file is protected?
Avatar of Ranger

ASKER

If you right-click on a .wma file, you can select Properties/Details and scroll down to see whether it is protected or not.  I'm guessing that this is an attribute that can be tested for via batch file - and if so, the rest is relatively easy.
I don't see "Protected" in the sample WMA files on my machine. I looked in the Details section and scrolled to the bottom. How exactly is it labeled, what group is it in, and can you list some elements that are near it?
Avatar of Ranger

ASKER

Here is what it looks like for me.

Protected WMA file properties:
http://i106.photobucket.com/albums/m262/AngryEagle/wma/wma_protected.jpg

Unprotected WMA file properties:
http://i106.photobucket.com/albums/m262/AngryEagle/wma/wma_unprotected.jpg
Avatar of Ranger

ASKER

Also - I have noticed that a file can either show as "yes", "no", or blank in the Protected field.
Sorry, I don't know how to get at these attributes via a DOS utility. If you find one, I can write the batch processing.
ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Config_Dot_Sys,

Does the script I gave you provide enough information to check the required property?

Regards,

Rob.