Author Topic: How to recall grouped expressions in COPY_EXISTING_REGEXP ?  (Read 1158 times)

Offline c4_angel

  • Planewalker
  • *****
  • Posts: 30
Hello all!

Just for example:

COPY_EXISTING_REGEXP ~sw1h0\([1-9]\).itm~ ~override/sw2h0\1.itm~

is apparently a wrong expression.

What is the right one?

Thank you.

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 298
  • Gender: Male
Re: How to recall grouped expressions in COPY_EXISTING_REGEXP ?
« Reply #1 on: May 11, 2017, 03:47:46 AM »
I don't think you can do it that way.

You could perform a COPY_EXISTING_REGEXP with BUT_ONLY to find the files and add them to an array.  Then you could loop through that, generating the output filenames and creating the clones with a COPY_EXISTING command.  (Edit: Or you could skip the array and do the same thing via an INNER_ACTION in the COPY_EXISTING_REGEXP.)
« Last Edit: May 11, 2017, 03:59:50 AM by Mike1072 »

Offline c4_angel

  • Planewalker
  • *****
  • Posts: 30
Re: How to recall grouped expressions in COPY_EXISTING_REGEXP ?
« Reply #2 on: May 12, 2017, 03:43:31 AM »
OK. Thank you.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: How to recall grouped expressions in COPY_EXISTING_REGEXP ?
« Reply #3 on: May 13, 2017, 02:45:48 PM »
Coded.

Offline GeN1e

  • Planewalker
  • *****
  • Posts: 267
  • Gender: Male
Re: How to recall grouped expressions in COPY_EXISTING_REGEXP ?
« Reply #4 on: May 16, 2017, 08:52:19 PM »
Strictly speaking, unless you wish to make a copy of file with a different name, you don't even need to specify the destination's filename, this:

COPY_EXISTING_REGEXP ~sw1h0\([1-9]\).itm~ ~override~

is perfectly fine to do.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: How to recall grouped expressions in COPY_EXISTING_REGEXP ?
« Reply #5 on: May 20, 2017, 06:13:11 PM »
I thought the OP wanted to mass-rename files using regexps. Aww, I coded that all for nothing.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: