|Trying to write a batch to create directories based on a partial filename, and then move files into their directory.|
Files look like this:
artist - title - abc123.mp3
artist - title - abc123.cdg
artist - title - xyz123.mp3
artist - title - xyz123.cdg
Folder should be "abc123" and "xyz123" and both files should be moved there. Each directory has 10-20 files in 'pairs' like shown above. I would like to run the batch directly from the directories.
Using the batch below - I'm not a coder so it is rough - the directories are created, but an error is generated and the files are not moved.
for /f "tokens=3 delims=-" %%a in ('Dir /b /a-d *.mp3') do (
echo move %%~nxa \%%~na
Thanks for looking.