You are not logged in.
I am trying to use the delete rule to remove the last few characters of a batch of files. This is my dilemma every file has "t18" in it but after that each file has a 2 unique characters. For an example:
random_file_t18af(every character after 'f' i want to delete)
random_file_t18bg(every character after 'g' i want to delete)
random_file_t18st(every character after 't' i want to delete)
random_file_t18oz(every character after 'z' i want to delete)
Is there a special code to insert that acts as the next two characters (i.e. t18**)
I am not sure of another approach to solve this issue. I appreciate all the help and support.
Offline
You have several options: Wildcards, Regular Expressions or Pascal Script.
Wildcards are the easiest option. It is available in the Remove and Replace rules.
Your particular problem can be solved with the following Replace rule:
Replace using wildcards "t18??*" with "t18$1$2" (skip extension)
(tick the "Interpret as wildcards" option)
If you take your examples:
random_file_t18af(every character after 'f' i want to delete)
random_file_t18bg(every character after 'g' i want to delete)
random_file_t18st(every character after 't' i want to delete)
random_file_t18oz(every character after 'z' i want to delete)
The output would be:
random_file_t18af
random_file_t18bg
random_file_t18st
random_file_t18oz
Offline
Thank you so much for the help. This solved my problem.
Offline