I have a music folder that is mostly MP3s but automatic software loads in FLACs. I know mp3tag doesn't have a lot of command line options but I am looking for suggestions on the best way to launch mp3tag but only have it load FLACs amongst a subdirectory which is a mix of mp3s and FLACs. One way I can think is to pick and choose each subfolder in explorer and choose mp3tag from there. Optimally the best way would be to launch mp3tag from the high level folder of music with something like mp3tag /filter *.FLAC which would scan and only load FLAC files into the program. I don't think an option like that exists though. Otherwise I am going folder by folder one by one and processing each folder. When there are a lot of album folders with FLACs, it can get tedious.
Ideas anyone?
Or you load both filetypes (*.mp3 and *.FLAC) into Mp3tag, but then activate the filter (F3) INSIDE Mp3tag with something like
%_extension% IS mp3
or
%_extension% IS flac
and only use this filtered list of files.
Another idea would be:
Filter your files outside of Mp3tag (using the Windows File Explorer or any other software you use for such a task) and then drag & drop this filtered list of files into Mp3tag.
Using the mp3tag filter makes the most sense to me, but another option is this:
Sort by Codec or Tag, which will group them by file type.
Click the top mp3 in the list, hold Shift (may differ on a Mac), and click the last mp3. This will select all the mp3s.
Press the Delete key, which will remove them from mp3tag but not actually delete them.
Now only the FLAC files remain for processing.
There are a few other ways to select the mp3s but this is the simplest.
What about a combination? ![]()
Load all files, filter the ones you don't want to see right now, press Ctrl + A and then press Del to remove these filtered files from the File List (they're not actually deleted, just removed from the current view).
Then deactivate the Filter.
The remaining files should be to ones you want to process.
Thanks all for getting back to me with your suggestions. I went a slightly different route. Since loading mp3tag in my root music folder can take a very long time because it scans and loads every file it recognizes, I asked chatgpt to write a windows batch file that would scan my music folder including subfolders and pass only those folders to mp3tag using the /fp: parameter for each folder.
It took some tweaking but this is the result and it seems to work quite well. It is much faster than loading my entire music folder and then filtering for only FLAC files. Hopefully this will help someone else. You will need to tweak the root music folder and the folder where mp3tag is installed.
@echo off
setlocal enabledelayedexpansion
:: Define the root directory to scan
set "ROOT_DIR=d:\media\music"
:: Define the Mp3tag executable path
set "MP3TAG_EXE=C:\Program Files\Mp3tag\Mp3tag.exe"
:: Temp files
set "FLAC_FOLDERS=temp_flac_folders.txt"
set "ALL_FOLDERS=temp_all_folders.txt"
set "MP3TAG_LIST=temp_mp3tag_list.txt"
:: Clear previous output files
> "%FLAC_FOLDERS%" echo.
> "%ALL_FOLDERS%" echo.
> "%MP3TAG_LIST%" echo.
:: Step 1: Get all folders containing FLAC files
for /f "tokens=*" %%F in ('dir /s /b /a-d "%ROOT_DIR%\*.flac"') do (
echo %%~dpF >> "%FLAC_FOLDERS%"
)
:: Step 2: Remove duplicates and strip trailing backslashes
sort "%FLAC_FOLDERS%" /unique > "%ALL_FOLDERS%"
(for /f "tokens=*" %%D in (%ALL_FOLDERS%) do (
set "folder=%%D"
set "folder=!folder:~0,-1!"
echo !folder! >> "%MP3TAG_LIST%"
))
:: Step 3: Read folder list and pass to Mp3tag
set "MP3TAG_ARGS="
for /f "tokens=*" %%L in (%MP3TAG_LIST%) do set "MP3TAG_ARGS=!MP3TAG_ARGS! /fp:"%%L""
if defined MP3TAG_ARGS (
echo Running Mp3tag with the following folders:
echo %MP3TAG_ARGS%
"%MP3TAG_EXE%" %MP3TAG_ARGS%
) else (
echo No FLAC-only folders found.
)
:: Cleanup
del "%FLAC_FOLDERS%" "%ALL_FOLDERS%" "%MP3TAG_LIST%"
exit /b
If you reduce the list of recognized files as suggested
it would probably be just as effective and without the need to use an external program.
Gotcha. I will try that also.
Fwiw. I tried both methods (the batch file and changing tags in MP3TAG) and I prefer the batch file method and it seems to load faster and avoid changing filters. I am more of a command line person so that might have something to do with it. Feel free to do whatever method works for you of course.
