Author Topic: Adding hyphens to a rename  (Read 58 times)

Offline davidgordon

  • Full Member
  • ***
  • Posts: 147
    • View Profile
    • davidgordon.co.uk
Adding hyphens to a rename
« on: Today at 08:03:58 AM »
I'd like to rename some files to a client's spec

{headline}-{seqn}

but I have multi word headlines and need hyphens rather than spaces.

So a file with the headline "An Important Event" needs to be renamed "An-Important-Event-01.jpg"

I can see how to do this after renaming the file (using Find and Replace) but I want to skip the extra step (and do the renaming as part of the FTP transmission).

Is this possible?

Offline alexmacnaughton

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: Adding hyphens to a rename
« Reply #1 on: Today at 08:37:23 AM »
Hi,  you can use the Variable Substring Extraction, Find and Replace command to achieve this

you would write it like this {headline::tr: /-}-{seqn} this would replace the spaces with hyphens

Offline davidgordon

  • Full Member
  • ***
  • Posts: 147
    • View Profile
    • davidgordon.co.uk
Re: Adding hyphens to a rename
« Reply #2 on: Today at 09:06:23 AM »
you would write it like this {headline::tr: /-}-{seqn} this would replace the spaces with hyphens

Brilliant, thanks Alex, that works exactly as I need. Saved in my rename list!

Cheers!

Offline alexmacnaughton

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: Adding hyphens to a rename
« Reply #3 on: Today at 09:20:50 AM »
Glad to help