This PowerShell script scans specified directories for music files (.mp3 and .flac), extracts metadata (title and artist), and saves this information to a text file (LibOutput.txt
) in the selected directory. If metadata is missing, the filename is used instead. The script includes a GUI for directory selection and offers post-process options to open the output file, the folder containing it, or to close the dialog box.
- Extracts music metadata and saves it to a text file.
- Handles .mp3 and .flac file formats.
- Offers GUI-based directory selection.
- Provides options to open the file or folder, or close the application upon completion.
- Windows 10 or later.
- PowerShell 5.1 or higher.
- .NET Framework 4.5 or higher (for System.Windows.Forms).
-
Download the Script:
- Download the
ExtractMusicMetadata.ps1
script from this repository.
- Download the
-
Prepare the Batch File:
- Create a batch file named
PrintLibToText.bat
in the same directory as the script. This batch file will be used to run the PowerShell script.
- Create a batch file named
Create a new text file and rename it to PrintLibToText.bat
. Edit it with the following content:
@echo off
PowerShell -NoProfile -ExecutionPolicy Bypass -File "ExtractMusicMetadata.ps1"
pause
Make sure that the path to the PowerShell script is correct. Adjust "ExtractMusicMetadata.ps1" if the script is located in a different folder.
To run the script:
- Double-click on PrintLibToText.bat.
- Follow the on-screen instructions to select the directory and manage the output.
Feel free to fork this project and submit pull requests. You can also open issues if you find bugs or have feature requests.