#1 2019-08-16 04:07

dzhay
Member
Registered: 2019-08-16
Posts: 1

Document Management System Email ID codes

Hi

I have to batch rename hundreds of emails, many of which come from a professional services firm using a document management system (I'm not sure which one). The document management system inserts into each email topic (usually at the end) a string as follows [XX-XXFIDZZZZZZZ].

XX represents the name of the firm in 2 letter abbreviation.
FID is the exact string.
and ZZZZZZZZ is the actual document number.

I need to remove this from every file name, but I can't figure out how to do it. I've tried the remove function but it hasn't worked.

Thanks in advance for any help!

Offline

#2 2019-08-16 07:47

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

Re: Document Management System Email ID codes

The simplest way is to use the Clean Up rule to strip the contents of [...] brackets. However, it will strip all occurrences of [...] brackets.

If you need the rule to be more specific by matching a more specific pattern, then you need to use the Regular Expressions rule, like follows.

Expression: \s+\[\w{2}\-\w{5}\d{7}\]
Replace: (empty)

This would convert "Hello [World] [AB-CDXYZ1234567]" to "Hello [World]", leaving unmatched brackets unaffected.

Offline

#3 2019-08-16 14:25

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Document Management System Email ID codes

Another idea, as far as I understood ( it's always a good idea to provide real before/after examples)


dzhay wrote:

FID is the exact string.


FROM:
follows [XX-XXFIDZZZZZZZ] - Kopie.txt
string [as] follows [XX-XXFIDZZZZZZZ] - [Kopie].txt
string as follows [XX-XXFIDZZZZZZZ].txt

TO:
follows - Kopie.txt
string [as] follows - [Kopie].txt
string as follows.txt

Wanted:
Match and remove "[.....-..FID......]"

So "[" and "-" and "FID" and "]" are my anchor points here.



Use:
RegEx rule
http://www.den4b.com/wiki/ReNamer:Rules:RegEx

Express: (.*)\s\[.+-..FID.+?](.*)
Replace: $1$2





HTH? big_smile


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

Board footer

Powered by FluxBB