Reverse file name

This is a place for users to discuss Altap Salamander. Please feel free to ask, answer questions, and express your opinion. Please do not post problems, bug reports or feature requests here.
urgriu
Posts: 5
Joined: 08 Jan 2013, 20:13

Reverse file name

Post by urgriu »

Hi
Can you help me please. I have version 2.53.
I have a little mere than 20,000 music files in different folders!

Examples.
A Hard Days Night # The Beatles
I Want To Hold Hand # The Beatles

I need to have each of the 20,000 file renamed (reversed) as below.

Examples.
The Beatles # A Hard Days Night
The Beatles # I Want To Hold Your Hand

Many Thanks in advance
User avatar
SvA
Posts: 483
Joined: 29 Mar 2006, 02:41
Location: DE

Re: Reverse file name

Post by SvA »

Hi urgriu

use the renamer plugin:
  • New name: $(OriginalName)
    Search for: (.*)\s*#\s*([^#]+)
    Replace with: $2 # $1
    Regular expression and Exclude extension need to be ticked
The search pattern assumes that the artist never contains a #, the title might. You may swap the contents of the parenthesis if it is the other way round. If both, title and artist might contain #, automation is not easily possible correctly for these files. I suggest then to first replace the non-seperator #-signs at least temporarily by some other character that is not used otherwise.
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Reverse file name

Post by Jan Rysavy »

Has every file exactly one # character inside? ( "aaa" vs "aaa # bbb" vs "aaa # bbb # ccc")
Is the # character always surrounded by spaces? ("aaa#bbb" vs "aaa # bbb" vs "aaa# bbb")
What about some file extension, is it always same? ("aaa" vs "aaa.mp3" vs "aaa.wav")
urgriu
Posts: 5
Joined: 08 Jan 2013, 20:13

Re: Reverse file name

Post by urgriu »

Thank you for the reply.

Yes every file has one # space inside!
Yes the # character is always surrounded by spaces!
The file extensions can be different! Examples wav or mp3 or cd+g or xvid...etc

Many Thanks
urgriu
Posts: 5
Joined: 08 Jan 2013, 20:13

Re: Reverse file name

Post by urgriu »

Thank you SvA for the reply..
use the renamer plugin:

New name: $(OriginalName)
Search for: (.*)\s*#\s*([^#]+)
Replace with: $2 # $1
Regular expression and Exclude extension need to be ticked

I have followed you instruction.
The result is showing in a little box.. Nothing To Do.

Cheers
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Reverse file name

Post by Jan Rysavy »

You will need to learn basic steps with Batch Renamer, please look at http://www.altap.cz/salamander/help/ren ... tchrename/
urgriu
Posts: 5
Joined: 08 Jan 2013, 20:13

Re: Reverse file name

Post by urgriu »

Thank you for the kind reply.

Its exactly the answer I did now want.
I had asked because I need help in finding the answer!

Cheers
User avatar
SvA
Posts: 483
Joined: 29 Mar 2006, 02:41
Location: DE

Re: Reverse file name

Post by SvA »

urgriu wrote: Its exactly the answer I did now want.
I had asked because I need help in finding the answer!
Sorry, but you don't expect to get help in finding the answer, you don't want to find the answer but to be presented the answer on a silver platter.

Since no one here knows all the details of your music store, all we could give you is guesswork which probably would not lead to the results expected.

You said, you got results showing in a little box. I cannot imagine, what that box should be. Please post a screenshot of it or describe what you did to get it.

Here's a somewhat more detailed description of what you need to do:
  • mark the files and folders containing files you want to rename
  • press Shift+Ctrl+R to get the Batch Rename plugin window.
  • tick Include subdirectories
  • fill in the other fields as detailed in my previous post
  • check results in the Preview pane
  • click the Rename button
urgriu
Posts: 5
Joined: 08 Jan 2013, 20:13

Re: Reverse file name

Post by urgriu »

Hi

The basics of finding my way around for what I usually use the program for is adequate.

Its the matricidal side (.*)\s*#\s*([^#]+)of how to do, that is miles beyond my ability to find or understand.
Your last piece of advise to include: Tick Include Subdirectories: Completed the job perfectly!

Thank you so much.
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Reverse file name

Post by Jan Rysavy »

This is the reason why you need to look at mentioned http://www.altap.cz/salamander/help/ren ... tchrename/

Basics of regular expressions are described there, for example in "Reordering words in names".
Post Reply