#1 : 14/05-18 23:12 Jonathan
Posts: 7
|
Dear All,
The story is a bit long, but I have tried to simplify it, so that it makes quick reading ... Before I discovered Advanced Renamer, I renamed multiple files (with in a folder) using the simple Windows method - select all, rename <some name>. This gave me a series of files : Filename (1), Filename (2), Filename (3), Filename (4), etc ... I then discovered Advanced Renamer and used it to add the words "Not Captured" to selected files within each folder - I moved the selected files to a temporary folder, renamed them by adding the words "Not Captured", and then moved them back. So in the original folder, I ended up with : Filename (1) Filename (2) Not Captured Filename (3) Filename (4) Filename (5) Not Captured Filename (6) Not Captured Filename (7) Filename (8) Not Captured Filename (9) Not Captured Filename (10) ... Filename (100) Filename (101) Not Captured etc ... However, I realised later that only Windows Explorer 'Name' order displays these files in file number order. The 'Name' order for many other systems display them as : Filename (1) Filename (10) Filename (100) Filename (101) Not Captured Filename (102) Filename (103) Filename (104) Not Captured Filename (105) Filename (106) Filename (107) Filename (108) Not Captured Filename (109) Filename (11) Filename (110) Filename (111) Filename (112) Not Captured ... Filename (12) Not Captured ... Filename (13) ... Filename (2) Not Captured Filename (20) Filename (200) Filename (201) Not Captured etc ... I know about the 'New Name' method and Filename<Inc Nr:1> I know about the 'Renumber' method and the following settings : i. Number position : 1 ii. New Number : 1 iii. Skip : 1 iv. Zero padding : Manual v. Number length: 5 vi. Apply to: Name However, I want the words "Not Captured" to be part of the new name - but only when they appear in the original name. If it's possible to do, could someone please give me the full formula/code (and other settings) to change the file names from the above to give the result below (can I also do it with sub folders) : Filename (1) to become Filename00001 Filename (2) Not Captured to become Filename00002 Not Captured Filename (3) to become Filename00003 Filename (4) to become Filename00004 Filename (5) Not Captured to become Filename00005 Not Captured Filename (6) Not Captured to become Filename00006 Not Captured Filename (7) to become Filename00007 Filename (8) Not Captured to become Filename00008 Not Captured Filename (9) Not Captured to become Filename00009 Not Captured Filename (10) to become Filename00010 ... Filename (100) to become Filename00100 Filename (101) Not Captured to become Filename00101 Not Captured etc ... Kind regards, Jon |
#2 : 15/05-18 12:39 Mark
Posts: 175
|
Reply to #1:
OK, assuming that you have a contiguous list, ie files named (1) to (100) with no missing numbers ... a solution is this: Replace Method Text to be replaced: [(]\d*[)] - note, there is a space before the first [ Replace with: (<Inc Nr:00001>) Occurrence: All Case Sensitive: Not ticked Use regular expressions: Ticked Apply to: Name If there are missing numbers, then you have to extract the number from the ( ) and somehow use that with the required number of leading zeros .... it gets very messy and very difficult .... See how you get on! |
#3 : 15/05-18 16:22 Jonathan
Posts: 7
|
Reply to #2:
Dear Mark, Spot on. I greatly appreciate it. I just had to take the brackets out of the Replace with. So instead of (<Inc Nr:00001>), I put <Inc Nr:00001> Kind Regards, Jon |
#4 : 15/05-18 17:16 Mark
Posts: 175
|
Reply to #3:
Ah, yes, I was focussed on the problem of using what was just inside the brackets .... RegEx is very powerful and I learn by each example. |