#1 2007-04-08 13:47

justsmile
Member
Registered: 2007-04-08
Posts: 2

Renamer: Moving parts of filename

Hello!

First of all: GREAT WORK, your software is really helpful!

My idea is:
Can you implement a function that would take x characters from position y of the filename and move them z letters to left, right, end, etc. ?

For example I have files like

20070102log.txt
20050405log.txt
20061105log.txt

Then I use this function to
take 8 letters from position 1
move them to
position 1 from right side.

After clicking rename, I will get

log20070102.txt
log20050405.txt
log20061105.txt

Would really help me a lot!
Thanks!

Last edited by justsmile (2007-04-08 13:52)

Offline

#2 2007-04-12 14:18

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Renamer: Moving parts of filename

Sorry, I'm away for few weeks and have almost no internet connection over here...

Your problem is easily solvable with the RegEx rule, with these parameters:
Expression: (\d+)(.*)
Replace: $2$1
Skip Extension: Yes

Or, you can use pascal script called "Move filename portion" that works exactly as your idea above.
Just change the values of these constants at the top of that script, after you load it:
  MOVE_START = 5;   // beginning of the movable portion
  MOVE_LENGTH = 3; // length of the movable portion
  MOVE_TO = 3;        // new position for the portion

Offline

Board footer

Powered by FluxBB