Hello,
I have a batch file that only contains the following commands:
FOR %%G IN (*.flac) DO "C:\Program Files (x86)\FLAC\metaflac.exe" --remove-all-tags "%%G"
FOR %%G IN (*.flac) DO "C:\Program Files (x86)\FLAC\TAG.exe" -f "Cuesheet=%~dpnG.cue" "%%G"
move *.flac C:\Users\SG\Music\CompletedFLACs
move *.cue C:\Users\SG\Music\CompletedFLACs
When I run the batch file I get these errors:
C:\Users\SG\Music\IncompleteFLACs>FOR %G IN (*.flac) DO "C:\Program Files (x86)\FLAC\metaflac.exe" --remove-all-tags "%G"
C:\Users\SG\Music\IncompleteFLACs>"C:\Program Files (x86)\FLAC\metaflac.exe" --remove-all-tags "ABC - 123.flac"
The following usage of the path operator in batch-parameter
substitution is invalid: %~dpnG.cue" "%%G"
For valid formats type CALL /? or FOR /?
The syntax of the command is incorrect.
C:\Users\SG\Music\IncompleteFLACs>FOR %G IN (*.flac) DO "C:\Program Files (x86)\FLAC\TAG.exe" -f "Cuesheet==%~dpnG.cue" "%%G"
When I put each command by itself in 3 separate batch files, it runs perfectly without error.
Can someone please explain why it runs without error when run individually but with all commands in a batch file, I get these errors?
Thanks,
SG
Simple Batch File...
Moderator: DosItHelp
Re: Simple Batch File...
You are missing a % so it is trying to interpret a numbered parameter instead of an alpha FOR variable.
FOR %%G IN (*.flac) DO "C:\Program Files (x86)\FLAC\TAG.exe" -f "Cuesheet=%%~dpnG.cue" "%%G"
Dave Benham
FOR %%G IN (*.flac) DO "C:\Program Files (x86)\FLAC\TAG.exe" -f "Cuesheet=%%~dpnG.cue" "%%G"
Dave Benham