Menu

#164 FileContentMatch

v8.5
wont-fix
None
1
2021-04-24
2018-08-09
Anonymous
No

I'm trying to batch rename PDFs based on content. %FileContentMatch1% works and basically is the same as the word looked for under Rules. However, I can't get %FileContentMatch2% nor 3-9 to work. These rename the files to Unknown FileContentMatchx where x is the number before the %. Am I doing something wrong?

Discussion

  • divinity666

    divinity666 - 2018-08-20

    You need to capture these as additional backreferences from your RegEx. You can do so by enabling capturing RegEx mode with brackets, e.g. "(first match) no match (second match)".
    This is not a bug, so closing it.

     
    • Anonymous

      Anonymous - 2021-04-24

      I got the same Problem. Could you elaborate? I could not find any help on that issue in the guide or the net. An example would help me a lot.

      Here is my setup so far:

      Under Additional Filters I tickted the Box "File Content" and chose "At least one of the words". In the text box underneath I entered search words like "invoice name1 name3"

      My Filename so far:
      ...path\%FirstFileContentDateNormalized% %FileContentMatch1% %FileContentMatch2% %FileContentMatch3% %Counter%.%FileExt%

      For that setup i got:

      %FileContentMatch1% shows the first found word but %FileContentMatch2% and %FileContentMatch3% give back the error mentioned by OP. In the File I tested it with there should be matches for 1 and 2 but not 3. Ideally i want that 1 and 2 are shown and 3 is ignored instead of showing the error in the file-name.
      Additionally it would be great to be able to set the order of the found matches myself instead of the order in that the words appear in the processed file. Is that even possible with DropIt?

      Im thankful for any help you care to give!

       
  • divinity666

    divinity666 - 2018-08-20
    • status: open --> wont-fix
     
  • Anonymous

    Anonymous - 2020-02-28

    Hello,
    I still don't get it. I go to 2.Rules -> Additional Filters. Under "File Content" I want to filter the words in the file (Invoice) and (DHL). So my new Filename should be "Invoice_DHL.pdf". So "Invoice" is %FileContentMatch1% and "DHL" is %FileContentMatch2% ? But it won't work. Can you please give an example for %FileContentMatch1-9% ?? Thanks a lot.

     

Log in to post a comment.