Hello, I have been trying to use the ID3tool to organize a list of MP3 files in a windows bat file. I have completed it in bash and I'm trying to convert to batch right now. Anyway, here is my problem:

I'm trying to get the album name for the mp3 file, but when I echo the name I get a blank line back.

echo.> name0.mp3
id3tool "name0.mp3" -a "the Album" -r "the Artist" -y "2001"
set name=id3tool name0.mp3 | grep Album 
echo %name%

I could not verify if the album name is correct on the mp3 itself (like I can in linux by just looking at the properties), therefore it is possible I'm not creating it correctly. Or perhaps grep does not work absolutely like the linux version (getting Album may not exist in a windows mp3 file the same way).

I appreciate your help, thanks.

Edited 6 Years Ago by Ryman: n/a

> I'm trying to get the album name for the mp3 file, but when I echo the name I get a blank line back.
Try feeding it a VALID mp3 file, not some crude thing containing only a single dot.

I have removed it then used a real mp3 file and the script is still returning a blank for the album name. The instructions are to create 100 dummy mp3 files, so it should work with blank mp3 files like the bash did.

All I need to really figure out is how to retrieve the mp3 tags (Album Name, Artist, etc) through batch.

Thanks

Edited 6 Years Ago by Ryman2: n/a

Oh I get it id3tool "name0.mp3" -a "the Album" -r "the Artist" -y "2001" This adds the tags to the dummy file set name=id3tool name0.mp3 | grep Album This is your attempt to read them back again?

Does this command work on it's own? id3tool name0.mp3 | grep Album If so, then the syntax for putting that output into a variable is as follows set name=[B]`[/B]id3tool name0.mp3 | grep Album[B]`[/B] Note the back-ticks!

This is the same, if you're using bash shell. set name=[B]$([/B]id3tool name0.mp3 | grep Album[B])[/B]

This question has already been answered. Start a new discussion instead.