#1 2010-02-07 22:13

xaniamike
Member
Registered: 2010-02-07
Posts: 3

File name from folder name

hallo!!!

I have my mp3 files in folders like

d:\MP3\Rock\ArtistName\AlbumName\01 - filename.mp3

and I want to rename them to

d:\MP3\Rock\ArtistName\AlbumName\ArtistName - 01 - filename.mp3

can you help me?

thank you...

Last edited by xaniamike (2010-02-08 14:37)

Offline

#2 2010-02-08 03:14

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: File name from folder name

hallo! smile

One of the solution would be:
1st cut/move your files to ArtistName folder and use this rule

1) Insert: Insert ":File_FolderName: - " as Prefix

using metatags...and then move back renamed files to AlbumName folder. HTH?

d:\MP3\Rock\ArtistName\AlbumName\ArtistName - 01 - file.mp3

I hope that you typed wrong underlined word; should be filename?

Cheers wink


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#3 2010-02-08 13:07

xaniamike
Member
Registered: 2010-02-07
Posts: 3

Re: File name from folder name

thank you for your answer but it isnt easy for me to cut/move my files to ArtistName folder because I have to do it too many times.
So i was hoping for a pascal script or something that could do the renaming in all my files automatically...


ps. you are right for the file=filename

Offline

#4 2010-02-08 14:29

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: File name from folder name

I would do this:

Rule 1: PascalScript.
begin FileName:=FilePath; end.

Rule 2: RegEx.
Expression: ([^\\]+)(\\[^\\]+\\)([^\\]+)$
Replace: $1$2$1 - $3


If this software has helped you, consider getting your pro version. :)

Offline

#5 2010-02-08 14:43

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: File name from folder name

xaniamike wrote:

thank you for your answer but it isnt easy for me to cut/move my files to ArtistName folder because I have to do it too many times.

I would do it in that way, but in your case where you have a lot of folders/files, pascal script can do the job. I hope that SafetyCar's solution is right for you? smile


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#6 2010-02-08 17:22

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: File name from folder name

Or an another approach.

For exactly such issues Denis has invented the new Rearrange Rule.
Read the wiki ==> http://www.den4b.com/wiki/ReNamer:Rules:Rearrange
But you need to download and use one of the latest betas
==> http://www.den4b.com/projects/ReNamer/ReNamerBeta.zip
Just unpack and use this one, or copy the ReNamer.exe into your ReNamer install folder.


xaniamike wrote:

I have my mp3 files in folders like

d:\MP3\Rock\ArtistName\AlbumName\01 - filename.mp3

and I want to rename them to

d:\MP3\Rock\ArtistName\AlbumName\ArtistName - 01 - filename.mp3

Please test this with some test files first.

Add the following 4 rules. (see wiki about rules http://www.den4b.com/wiki/ReNamer:Rules)

0)
Name: d:\MP3\Rock\ArtistName\AlbumName\01 - filename.mp3

1) Delete: Delete from Position 1 until the End (don't skip extension) (this deletes the old file name)
New Name:

2) Insert: Insert Metatag  ":File_FilePath:" as Prefix
New Name: d:\MP3\Rock\ArtistName\AlbumName\01 - filename.mp3

3) Remove: Remove all "d:\" (skip extension)
New Name: MP3\Rock\ArtistName\AlbumName\01 - filename.mp3

4) Rearrange: Split by delimiters "\", New pattern "$3 - $5" (skip extension)
New Name: ArtistName - 01 - filename.mp3

Rearrange Explanation:

MP3\Rock\ArtistName\AlbumName\01 - filename.mp3
$1 \  $2 \    $3   \   $4    \      $5



Once you have added all 4 rules,
press on preview
and you should see

Name                 New Name
01 - filename.mp3    ArtistName - 01 - filename.mp3


If this all went fine, press on Rename.

Now test this with one folder of your real files, then with the rest.

HTH?  big_smile

Last edited by Stefan (2010-02-08 17:29)


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#7 2010-02-08 18:20

xaniamike
Member
Registered: 2010-02-07
Posts: 3

Re: File name from folder name

i tried SafetyCar's way and i had the result  i was hoping for...

thank you  SafetyCar ...

I will try Stefan's suggestion too, but I want to study it first..

many thanks to all of you..

Last edited by xaniamike (2010-02-09 13:21)

Offline

Board footer

Powered by FluxBB