#1 : 01/11-18 15:50 Joris Houben
Posts: 3
|
how can I:
1) delete all text in filenames 2) remove spaces 3) set the number combinations -001 and -002 at the end now: 3251pict floris -001 Floris 6985 thysen -002 6985 Malina 98874 up -001 pic -002 Manilla 985471 pict new 3251-001 6985-002 98874-001 985471-002 |
#2 : 02/11-18 08:51 David Lee
Posts: 1125
|
Reply to #1:
You didn't request removal of duplicate numbers but your second example shows: Floris 6985 thysen -002 6985 -> 6985-002 Is the extra 6985 in the example a mistake? |
#3 : 02/11-18 09:03 Joris Houben
Posts: 3
|
Reply to #2:
Sorry, thats indeed a mistake and there shout not be dubbele numbers (only -001 and -002) |
#4 : 02/11-18 09:46 David Lee
Posts: 1125
|
Reply to #3:
That makes the problem more straightforward. Maybe not the best solution but you can do it in two steps: first move the -ddd suffixes to the end of the filenames and then remove blocks of non-digit characters. Use two instances of the Replace method with "Use regular expressions" ticked. 1:Replace Text to be replaced: (.*)(-\d{3})(.*) Replace with: \1\3\2 2:Replace Text to be replaced: (\D*)(\d*)(\D*)(-\d*) Replace with: \2\4 |
#5 : 02/11-18 11:34 Joris Houben
Posts: 3
|
Reply to #4:
This is exactly what I needed and works perfectly. Realy awesome Thanks!! |