Question : Batch File Wildcards

I want to generate a bat file for multiple tag processing.
I can populate all variables automatically but how to replace the %title% variable with a wildcard and execute the command?
1:
2:
"C:\Program Files (x86)\tools\tag.exe" -t Genre="%genre%" "%_folderpath%\%track%. %title%.%_extension%"
IF ERRORLEVEL==1 PAUSE

Answer : Batch File Wildcards

If I understand you, this may be in line with what you are looking for.  We can use the FOR command to look for any files that match a pattern, and then process each one (I think in your case you are only expecting one).  So the code looks like the attached.

The loop variable %%A will take on the full value of any file that matches "%FolderPath%\%Track%.*.%Extension%".

~bp
1:
2:
3:
4:
5:
6:
7:
8:
9:
set TagExe=C:\Program Files (x86)\tools\tag.exe
set Genre=Alternative
set FolderPath=E:\Music\Depeche Mode\(1990) Violator
set Track=01
setExtension=flac
for %%A in ("%FolderPath%\%Track%.*.%Extension%") do (
  "%TagExe%" -t Genre="%Genre%" "%%A"
  IF ERRORLEVEL==1 PAUSE
)
Random Solutions  
 
programming4us programming4us