#1 : 02/07-24 14:38 Erik Hansen
Posts: 3
|
Hello!
My method I created is working almost just like I want to, but it is adding unwanted spaced where there occurs upper case words. For example like here: "Detection of Location And Size of Water Tree In XL PE Cables By Frequency Response Analysis a Simulation Study" Everything looks perfect, except there is an unwanted space added in the word "XLPE". How do I fix this? Thanks |
#2 : 02/07-24 16:36 Miguel
Posts: 136
|
Reply to #1:
Hi Erik. I have several questions for you: Are you trying to rename files or folders with Advanced Renamer? Is that text string the name of a file or a folder? I say this because this is a forum for ARen users. It would be good to see your method. Anyway this method solves the problem. Text to be replace: ([A-Z]) ([A-Z]\w.+) Add a space between ) ( Replace with: $1$2 Case sensitive: Yes Use regular expressions: Yes Sorry if I sound rude. All the best Miguel |
#3 : 03/07-24 07:45 Erik Hansen
Posts: 3
|
Reply to #2:
Thank you for you reply, Miguel, and no worries, you do not sound rude :) I am trying to rename PDF files in a folder. The files are downloaded from IEEExplore.org and when the files are downloaded they have a naming format like this: "detection_of_location_and_size_of_water_tree_in_xlpe_cables_by_frequency_response_analysis_a_simulation_study" And I am trying to make it look like this (with lower case letters for specific words, like "for", "from", "to", "the", "and", "if", "with" etc..): "Detection of Location and Size of Water Tree in XLPE Cables By Frequency Response Analysis a Simulation Study". Currently, this is the closest I have gotten: "Detection of Location And Size of Water Tree In XL PE Cables By Frequency Responseanalysis ASimulation Study" The words "Responseanalysis" should be two seperate words with upper case first letter, and "ASimulation" should be split up with lower case "a". Thank you for your help. Hope this makes my question a bit clearer :) |
#4 : 03/07-24 12:09 Styb
Posts: 101
|
Reply to #3:
Hi, save your method and post it on the forum. I don't understand why the spaces are added or removed in the new filename. Also, try to use the following method: https://www.mediafire.com/file/2zt4u3ozj4sl8n9/t ohansen.aren/file |
#5 : 05/07-24 20:04 Miguel
Posts: 136
|
Reply to #3:
Hi. Could you post some other examples so we can see the differences between them? |
#6 : 22/07-24 09:43 Erik Hansen
Posts: 3
|
Reply to #5:
Hello! Yes. Here are some examples: From this: "procedures_for_testing_control_and_protection_scheme_based_on_GOOSE_messages_methodology_and_constraints_from_engineering_perspective" To this: "Procedures for Testing Control And Protection Scheme Based On GO OS EMessages- Methodologyand Constraints From Engineering Perspective" And From this: "digital_differential_protection_of_power_transformers_using_DFT_algorithm_with_CT_saturation" To this: "Digital Differential Protection of Power Transformer Using DF TAlgorithmwith CT Saturation Consideration" |
#7 : 22/07-24 10:15 Delta Foxtrot
Posts: 285
|
Reply to #6:
Hi Erik, The results you want can be gotten pretty easily with a batch of just three or four methods (in working your examples I used four to clarify): 1. REPLACE: Replace all underscores with space 2. NEW CASE: Highlight "Set upper case first letter in every word" 3. LIST REPLACE: You'll need to enter each word you want to begin with lower case (see my example below) and the replacement word in lower case, each WITH A SPACE BEFORE AND AFTER. For instance, replace " From " with " from ". I used the words A, An, The, And, From, To, If, With, Of, In, and By. Don't forget the spaces on the "Replace with:" information. 4. LIST REPLACE: (again, you could do this in #3 List replace) Add all the acronyms or words you want in upper case, again, WITH SPACE BEFORE AND AFTER both the "Text to be replaced" and "Replace with" fields. * Check "Case sensitive" on the two List replace methods * EDIT: By the way, the last method isn't even necessary if all the acronyms are in caps in the oringal filenames. The New case method won't mess with the letters after the first, and that letter is already capitalized. END EDIT Result: https://drive.google.com/file/d/1rSLCEN4xL5B-QCY X2AycGzZOH2n8Z97H/view?usp=sharing This won't fix a few things like if you wanted to use a dash t o denote a colon in a non-digital filename, with a capitalized A, An, The, etc. after it, but it's basically what you need. Best, DF |
#8 : 22/07-24 12:52 Miguel
Posts: 136
|
Reply to #7:
Hi DF. My error was start witn his first name´s format: "Detection of Location And Size of Water Tree In XL PE Cables By Frequency Response Analysis a Simulation Study". I thought all his files would be in that format. Your solution work like a charm. Only one doubt. How did you manage to capitalize "xlpe" in the first name? Miguel |
#9 : 22/07-24 14:01 Delta Foxtrot
Posts: 285
|
Reply to #8:
HA! You're right, Miguel, in his original example "xlpe" was the only acronym that wasn't all uppercase. I'd already added it in to the #4 List replace method when I noticed that the others were capitalized. I guess I assumed that xlpe was too. :) Anyway, that #4 List replace was useful for that, and would be for other uncapitalized acronyms, if any. Best, DF |