This maybe simple enough, but I am not that of an expert to computer languages. I've been stuck searching for a solution for almost 3 hours on the internet.
Assuming all my mp3 files are titled with "Name of Artist - Title of Song.mp3" I would want it to output into a txt file that contants:
Artist: Name of Artist
Song: Title of Song
How do I parse the file name into two parts separated with a hyphen? I've been trying to do some sort of automation with batch files for archiving purposes and here's my code where I'm stuck with:
@echo off
for /r %%a in (*.mp3) do (
(
for %%b in ("%%~na") do echo ^Artist: %%~b
echo ^Song:
)>"%%~dpna.txt"
)
Change the startfolder following PushD to fit your environment.
Sample output on my ramdrive a:
How do I parse the file name into two parts separated with a hyphen?
Use the following batch file as a starting point:
Example usage:
I would want it to have a single text file for every mp3 file. Is that possible?
Yes Use the following batch file:
Example usage: