Help - Search - Members - Calendar
Full Version: metaflac question ...
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
dr.zick
hey i'm kinda bad with dos commands (but getting better) ... i want to write a reg key for a command to execute on a flac file from the rigt click menu called "tag" ... i'm okay with the regfile syntax, i just need some help with the command.

the command i would like to execute is to take the flac file name (%1 in dos), strip the ".flac" portion o the filename, and add ".tag" (the ascii file format i use for my tags). so if i right-click a file called "Beatles-love.flac" this command would look for a "Beatles-love.tag" and get the tags from that file.

how would i strip a files extension and add another extension like that?

thanx for any help.
HydroFred
QUOTE(dr.zick @ Jan 16 2007, 17:26) *

how would i strip a files extension and add another extension like that?

%~n1.tag
dr.zick
i take it the ~n means something ... sorry for asking i'm just trying to learn so i can replicate this solution to other regkeys i'm writing
HydroFred
QUOTE(dr.zick @ Jan 16 2007, 17:33) *

i take it the ~n means something

Yes, it means you only want the name (hence n) of the file, without the extension.

If you are interested in other choices, start a console and type
CODE

for /?

If you scroll down five pages, you will see all options explained.
dr.zick
i appreciate it man (or woman, but i'm guessing man because of the fred thingy)
HydroFred
QUOTE(dr.zick @ Jan 16 2007, 17:44) *

i'm guessing man

Your diagnosis is accurate, doctor smile.gif
dr.zick
hey, my registry command isn't working ... and i'm guessing it's %~n1 part.
maybe my syntax is wrong ... i'm still working it out but here it is:

REG_EXPAND_SZ
%SYSTEMROOT%\system32\metaflac --import-tags-from=%~n1.tag %1

any thoughts anyone?
Synthetic Soul
I would provide the full path to the file. You may find that it has actually worked, but the files are in system32 or something.


REG_EXPAND_SZ
%SYSTEMROOT%\system32\metaflac --import-tags-from="%~dpn1.tag" %1

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.