Re: v2.0 beta 12 says FLAC files encoded in 2007 are corrupt
Reply #28 – 2022-12-04 10:40:09
It occurs to me that the -F was before the input file in the command line in a previous example, but I don't know how to do that in a FOR loop. Is that my problem? How would I write this?I don't follow what you mean. FOR /r %%f IN (*.flac) DO flac -F -5 -fV "%%f"...looks OK to me, the "-F" comes after "flac" and before "%%f" (which is the token representing the input file), so what do you think the problem is? My apologies, I don't know the proper syntax for this.
FOR <parameters> IN (<search>) DO <operation> initiates the looping structure, performing the <operation> on all items which match <search>; /r causes the search to recurse subdirectories; %% is the prefix to a token declaration (within batch files, use only single % on the command line), so in this specific case %%f is declared to represent each item which matches the search – the choice of letter must not conflict with other tokens in use; (*.flac) searches for all files with the .flac extension; flac <parameters> is the operation to be performed on each item found; "%%f%" is the token representing the search item (as previously declared), but is in quotes or double-quotes (it doesn't matter which, but if the %%f string might contain one use the other) to prevent any spaces in the %%f string causing a misinterpretation (because an unquoted space is the end-of-token marker).