Discussion:
Question....
(too old to reply)
Cor
2012-02-12 21:42:34 UTC
Permalink
Hello guys,

My question is: I have a great amount of mp3 files, that are named the wrong
way round, i.e.
Frankie - Sister Sledge.
But the bulk of my other mp3 files (about 155000) is named Sister Sledge -
Frankie. In other words: Artist first, space, dash - filename.mp3.

Is there a way to turn these files around automatically using some sort of
DOS-commando?
I don't see myself renaming appr. 2500 mp3's by hand....

Thanks in advance!!

Cor

***@Versatel.nl
DOS Guy
2012-02-12 22:41:57 UTC
Permalink
Post by Cor
My question is: I have a great amount of mp3 files, that are named
the wrong way round, i.e.
Frankie - Sister Sledge.
But the bulk of my other mp3 files (about 155000) is named
Sister Sledge - Frankie.
In other words: Artist first, space, dash - filename.mp3.
Is there a way to turn these files around automatically using some
sort of DOS-commando?
I don't see myself renaming appr. 2500 mp3's by hand....
What I would do is this:

Open a command prompt and navigate to the directory containing your mp3
files and issue the command:

dir *.mp3 /b > dir.txt

That will create a text file containing a list of the names of all the
mp3 files.

Now, if you have excel (or any spreadsheet program) do this: Open the
file "dir.txt" and when asked how to read the file, select "delimited".

Choose "-" and "." as your delimiter characters.

The file will then be read in, with the first part of the file (the name
of the track) put into it's own column (column A) followed by the name
of the group in the next column (column B) followed by "mp3" in the
third column (column C).

Any file that does not have a "-" in the name won't be processed
correctly according to this scheme, and neither will any file name that
has more than 1 "-" character.

Once the names are read in, you can insert extra columns and copy the
columns to create your batch commands.

What you want is to have this in column A/B/C/D/E/F/G/H/I/J:

Rename/track/-/artist/mp3/" "/artist/-/track/./mp3

So in these columns, put these:

a) Rename
b) track
c) - (dash)
d) mp3
e) " " (space character)
f) artist
g) - (dash)
h) track
i) . (dot)
j) mp3

Then save the file as an MS-DOS text file (save it also as .xls just in
case you screw up). Call it "rename-mp3.txt".

If you then edit the file in notepad, look for double-space characters
and spaces that shouldn't be there. You can perform global
search/replace if necessary. Then rename the file to "rename-mp3.bat"
and then run the file. But again, give it a good read to make sure it's
going to rename them properly before you execute it.
billious
2012-02-12 22:42:54 UTC
Permalink
Post by Cor
Hello guys,
My question is: I have a great amount of mp3 files, that are named the
wrong way round, i.e.
Frankie - Sister Sledge.
But the bulk of my other mp3 files (about 155000) is named Sister Sledge -
Frankie. In other words: Artist first, space, dash - filename.mp3.
Is there a way to turn these files around automatically using some sort of
DOS-commando?
I don't see myself renaming appr. 2500 mp3's by hand....
Thanks in advance!!
Cor
Oh, much better to give a more explicit title to your thread - many
respondent simply disregard "Question" or similar - after all, most threads
posted are questions, so it doesn't impart much information.

I'd try alt.msdos.batch.nt where similar problems have been solved before -
but they may be buried in the history. Try looking for threads with a title
including "file rename" or something similar. They may be threads titled
'Question' - but they're likely not to be as helpful...

Primitively, this batch may be a start:

@echo off
setlocal enabledelayedexpansion
for /f "tokens=1,2,3 delims=-." %%i in (
'dir /a-d/b *.mp3') do if not "%%k"=="" (
call :strip %%i
set track=!artist!
call :strip %%j
ECHO ren "%%i-%%j.mp3" "!artist! - !track!.mp3"
)
goto :eof
:strip
set artist=%*
goto :eof


BUT it relies on the absence of certain 'poison' characters (like ! for
instance) in either the artist or track name.

AND of course it's unable to INTELLIGENTLY distinguish between artist and
title, it will simply mechanically switch the two.

The ECHO keyword would need to be omitted to ACTUALLY rename the file. It's
normal practice in alt.msdos.batch.nt to simply echo the command to the
screen to avert tragedy if possible.
Jawade
2012-02-12 22:01:36 UTC
Permalink
Post by Cor
Hello guys,
My question is: I have a great amount of mp3 files, that are named the wrong
way round, i.e.
Frankie - Sister Sledge.
But the bulk of my other mp3 files (about 155000) is named Sister Sledge -
Frankie. In other words: Artist first, space, dash - filename.mp3.
Is there a way to turn these files around automatically using some sort of
DOS-commando?
I don't see myself renaming appr. 2500 mp3's by hand....
Thanks in advance!!
First: You have to sort out the files with the title first and the
files with the artist first. No any program or script can recognize
if it is a title or an artist.
Second: All filenames need to have ' - ' (space, dash, space).

If that is correct, I can write a program who can do the job.


Met vriendelijke groeten, Jawade.
--
Nieuw! hosts file manager, voor bewerken enz. In 2012 veel vernieuwd.
http://jawade.nl/ HexEditor, Diskeditors+MBR-rebuilder, POP3lezer,
Bootmanager (+Linux, +Engels), ClrMBR, SDir(DIRsize), Website-updater,
Consolefilebrowsers, Kalender, USB-stick tester, Webtellers en IP-log.
Cor
2012-02-16 09:00:10 UTC
Permalink
Yes, please, I would love to have a program that can do the job!
Post by Jawade
Post by Cor
Hello guys,
My question is: I have a great amount of mp3 files, that are named the wrong
way round, i.e.
Frankie - Sister Sledge.
But the bulk of my other mp3 files (about 155000) is named Sister Sledge -
Frankie. In other words: Artist first, space, dash - filename.mp3.
Is there a way to turn these files around automatically using some sort of
DOS-commando?
I don't see myself renaming appr. 2500 mp3's by hand....
Thanks in advance!!
First: You have to sort out the files with the title first and the
files with the artist first. No any program or script can recognize
if it is a title or an artist.
Second: All filenames need to have ' - ' (space, dash, space).
If that is correct, I can write a program who can do the job.
Met vriendelijke groeten, Jawade.
--
Nieuw! hosts file manager, voor bewerken enz. In 2012 veel vernieuwd.
http://jawade.nl/ HexEditor, Diskeditors+MBR-rebuilder, POP3lezer,
Bootmanager (+Linux, +Engels), ClrMBR, SDir(DIRsize), Website-updater,
Consolefilebrowsers, Kalender, USB-stick tester, Webtellers en IP-log.
Jawade
2012-02-16 21:57:15 UTC
Permalink
Post by Cor
Post by Jawade
First: You have to sort out the files with the title first and the
files with the artist first. No any program or script can recognize
if it is a title or an artist.
Second: All filenames need to have ' - ' (space, dash, space).
If that is correct, I can write a program who can do the job.
Yes, please, I would love to have a program that can do the job!
I've made it. It's here: http://jawade.nl/temp/mp3pm.exe
Put the file in the directory of the mp3 files and start it. It
turns the names like:

Help - Beatles.mp3 -> Beatles - Help.mp3

Maybe it's a good idea to make a backup first.


Met vriendelijke groeten, Jawade.
--
Nieuw! hosts file manager, voor bewerken enz. In 2012 veel vernieuwd.
http://jawade.nl/ HexEditor, Diskeditors+MBR-rebuilder, POP3lezer,
Bootmanager (+Linux, +Engels), ClrMBR, SDir(DIRsize), Website-updater,
Consolefilebrowsers, Kalender, USB-stick tester, Webtellers en IP-log.
Cor
2012-02-18 19:21:53 UTC
Permalink
You are GREAT!!! Thank you very much!
Post by Jawade
Post by Cor
Post by Jawade
First: You have to sort out the files with the title first and the
files with the artist first. No any program or script can recognize
if it is a title or an artist.
Second: All filenames need to have ' - ' (space, dash, space).
If that is correct, I can write a program who can do the job.
Yes, please, I would love to have a program that can do the job!
I've made it. It's here: http://jawade.nl/temp/mp3pm.exe
Put the file in the directory of the mp3 files and start it. It
Help - Beatles.mp3 -> Beatles - Help.mp3
Maybe it's a good idea to make a backup first.
Met vriendelijke groeten, Jawade.
--
Nieuw! hosts file manager, voor bewerken enz. In 2012 veel vernieuwd.
http://jawade.nl/ HexEditor, Diskeditors+MBR-rebuilder, POP3lezer,
Bootmanager (+Linux, +Engels), ClrMBR, SDir(DIRsize), Website-updater,
Consolefilebrowsers, Kalender, USB-stick tester, Webtellers en IP-log.
Jawade
2012-02-18 19:25:08 UTC
Permalink
Post by Cor
Post by Jawade
Post by Cor
Post by Jawade
First: You have to sort out the files with the title first and the
files with the artist first. No any program or script can recognize
if it is a title or an artist.
Second: All filenames need to have ' - ' (space, dash, space).
If that is correct, I can write a program who can do the job.
Yes, please, I would love to have a program that can do the job!
I've made it. It's here: http://jawade.nl/temp/mp3pm.exe
Put the file in the directory of the mp3 files and start it. It
Help - Beatles.mp3 -> Beatles - Help.mp3
Maybe it's a good idea to make a backup first.
You are GREAT!!! Thank you very much!
Okay, you're welcome. Have fun. :-)


Met vriendelijke groeten, Jawade.
--
Nieuw! hosts file manager, voor bewerken enz. In 2012 veel vernieuwd.
http://jawade.nl/ HexEditor, Diskeditors+MBR-rebuilder, POP3lezer,
Bootmanager (+Linux, +Engels), ClrMBR, SDir(DIRsize), Website-updater,
Consolefilebrowsers, Kalender, USB-stick tester, Webtellers en IP-log.
Loading...