Replace Whole Words

Would you like Bulk Rename Utility to offer new functionality? Post your comments here!

Replace Whole Words

Postby TunaMan » Mon Jul 17, 2006 4:47 pm

I would like to suggest the ability to limit replacements to whole words only. Maybe a checkbox next to "Match Case" that says "Whole Words".

Example: I want to change every instance of "Prop" to "Property" but I only want to change the exact word "Prop" and don't want to include anything else ("Property", "Proper", "Proposition", etc.). This would be a tremendous time saver as you wouldn't have to review the New Name list manually and maybe miss something.

I'm new to this utility so if the product already does this, I'm sorry for wasting your time. Likewise, if this has already been suggested, then I'm just seconding the motion. BTW, BRU is great!!!! It really saved my ass this last weekend with the "Path Len Min" feature. I was moving thousands of documents from DocuShare to SharePoint and ran into SharePoint's 255-char maximum pathname limit. BRU saved me!!!
:D
TunaMan
 
Posts: 1
Joined: Sat Jul 15, 2006 10:52 pm

Postby Glenn » Tue Jul 18, 2006 2:05 am

If you are looking at a single occurrence per filename, you should be able to do it using the Regular expressions (section 1)

Match: (.*)\bProp\b(.*)
Replace: \1Property\2

If you want to match both Prop and prop use Match: (.*)\b[pP]rop\b(.*)

To match multiple occurrences per filename is more complex, but the simplest way would be to run the rename more than once on these, each time renaming another occurrence.
Things are still not bulletproof, esp not knowing what the range of filenames you are working with, but this should get you started.

Cordially,
Glenn
Glenn
 
Posts: 28
Joined: Fri Apr 14, 2006 4:53 pm
Location: Winnipeg, Canada


Return to Suggestions