#1 2007-08-31 02:38

JohnnySH
Member
Registered: 2007-08-31
Posts: 11

Renaming Files from external text file

Hi well done on such a great program (renamer)

could you please write me the script

that uses an external text file like below and does the following

1) ignores first line of text in the file

2) swaps the first part i.e. title with the artist for each line (- is the marker between artist & title)

i.e. was like
Ain't That A Shame - Fats Domino

and rename file as

Fats Domino - Ain't That A Shame

and so on till end of text

3) Does this for each line until end


thanks


my external text files look like so

*****Miss this line*********
Ain't That A Shame - Fats Domino
Ain't That A Shame - Pat Boone
All Shook Up - Elvis
Baby Come Back -  The Equals
Bachelor Boy - Cliff Richards
Be Mine - Lance Fortune
Big Bad John - Jimmy Dean
C'mon Everybody - Eddie Cochran
Day Dream Believer - The Monkees
Out Of Time - Chris Farlowe
Poetry In Motion - John Tilloston
Shake, Rattle And Roll - Bill Haley
Walkin' Back To Happiness - Helen Shapiro
Wouldn't It Be Nice - Beach Boys
You Got Your Troubles -  The Fortunes
*** Stop Here ***

Offline

#2 2007-08-31 06:28

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

Re: Renaming Files from external text file

Hi John! I've just replied to your email.

Are you sure you need a script for that? Because you can load
that list of filenames using "UserInput" rule, then use "RegEx"
rule to swap the parts.

Configuration for the RegEx rule:
Expression: (.*) - (.*)
Replace: $2 - $1

If you still require a script - I will write one...

Offline

Board footer

Powered by FluxBB