Thanks baralgin !
Now here's my fooCDtect tagging script : http://rapidshare.com/files/148381228/fooCDtag.vbs.html
(with credits to my talented friend Gemini)
Here's how it works :
1. Get Tag.exe : Tag.exe is a tagging utility bundled with FLAC, so it should be in your FLAC folder, typically C:\Program Files\FLAC\ . Otherwise you can look for it here : http://www.synthetic-soul.co.uk/tag/
2. Put the fooCDtag.vbs file inside the same folder as Tag.exe (the folder itself doesn't matter as long as the two files are together)
3. Use fooCDtect to test a bunch of FLAC files
4. Before closing fooCDtect, choose the "Simple" log option <-- **mandatory**
5. Choose also the "ANSI" encoding option <-- **mandatory**
6. Choose "Save all" to generate a log (fooCDtect.log.txt)
7. Save the log inside the same folder as fooCDtag.vbs and Tag.exe
So now we have Tag.exe, fooCDtag.vbs and fooCDtect.log.txt in the same folder, right ?
Now with a trembling hand, double-click on fooCDtag.vbs... voilà ! That's all !
You'll see a bunch of command-line windows open and close. Wait until everything is finished. All your lossless files tested with fooCDtect will be tagged as follows :
- Tag name : %aucdtect%
- Tag value : fooCDtect result (e.g. "CDDA 100%", "MPEG 95%", etc.)
It's a very simple script, but it works. Hey baralgin, who knows, maybe you can integrate it in a future version of fooCDtect, so that we have an "all-in-one" tool ?
This script has been tested only on FLAC files. I don't know if it will work on other lossless files. I guess it should since Tag.exe is a multi-purpose tagging utility. But it will be up to you to find out (I only have FLAC files so I haven't been able to test). If you want to try the script on non-FLAC files, you just need to manually edit the script and replace the ".flac" part with the right lossless extension.
fooCDtag.vbs is provided "as is". It shouldn't do any harm to your files or blow away your computer. But in the very unlikely event that it should happen, I couldn't be held responsible for that.
Now enjoy !
foorious
PS : before somebody asks (and in case the rapidshare link becomes obsolete), here are the contents of the script (just put them inside a text file, name it fooCDtag.vbs and you're ready to go) :
dim filesys, filetxt
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.OpenTextFile("fooCDtect.log.txt", ForReading, True)
Set shell = CreateObject("WScript.Shell")
Do While Not filetxt.AtEndOfStream
line = filetxt.ReadLine
pos = InStr(line, " ** ")
file = Mid(line, 1, pos - 1)
tag = Mid(line, pos + 4)
cmd = "Tag.exe -t aucdtect=" & chr(34) & tag & chr(34) & " " & chr(34) & file & ".flac" & chr(34)
shell.Run cmd, 1, false
Loop