Ranger
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!
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!
Protected? What does that mean? How can that batch processing know that a file is protected?
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?
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
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
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Config_Dot_Sys,
Does the script I gave you provide enough information to check the required property?
Regards,
Rob.
Does the script I gave you provide enough information to check the required property?
Regards,
Rob.