You are not logged in.
Pages: 1
Hell of a piece of software! Leaves the competition in the dust, suitable for trivialities and then with hiccups. Renamer is the type of software that begs for constructive criticism in its ascent to superbness. Renamer provides the user a venue, for a programming platform, without the need of using the tedious syntax of a programming language but amazingly caters for that as well.
I was looking for a smart title case converter for files and folders and found none that came even close to my needs. One was marginal only offering a max of 24 Upper case exemptions and only worked for files not folders. So I proceeded to construct my own with Renamer. It's not entirely finished but it works, taking almost 70 steps to complete the code.
In case you're wondering I divided the category of Upper case exemptions as follows:
1 Prepositions
2 Conjunctions
3 Pronouns
4 Verbs/Adverbs
5 Articles
Had there been some additional flexibilities in the command structure, I could have cut down the coding to ten steps! The following sugestions will improve Renamer tremendously.
First the Find and Replace should have available:
Match whole word only with two options – alphas only and alphanums only
Also match beginning of word only and match beginning of word only at beginning/end of line and match word only at beginning/end of line option would be nice
For case please add Capitalize only the first LETTER of title while leaving the remainder unchanged. I'm using this for audio and video files which have non-alphas appended usually at the beginning of the title such as
11roy orbison …
11 roy orbison
120--roy orbison
13 – roy orbison
–$ roy orbison
and so on.
In the regex exists the greatest deficit. I assume you are using the .NET Framework Regex which is woefully poor with substitution commands. Vim is a little better as it includes
\L
the following characters are made lowercase
\U
the following characters are made uppercase
\E
end of \U and \L
\e
end of \U and \L
\r
split line in two at this point
\l
next character made lowercase
\u
next character made uppercase
Adding additional commands may not be easy since this is not exactly open source software. But what it severely requires is the and()/or(|) operator in search and substitution similar to find and replace.
Before I forget please add refresh to context menu of “add your files here”.
Awaiting your feedback
Thanks
Offline
Hi
I simply use the Case rule, where I normally select the "(only the) first letter capital" option.
I also use "force case for fragments" option, where I have entered words like HTML,DVD,CD,PHP,Java,JavaScript,C++, etc.
http://www.den4b.com/wiki/ReNamer:Rules:Case
Is that what you are looking for?
BTW can you integrate a spell-checker (like Aspell) with ReNamer? That would be great help.
Last edited by narayan (2012-09-06 03:29)
Offline
In the regex exists the greatest deficit. I assume you are using the .NET Framework Regex which is woefully poor with substitution commands.
This app's coded in Delphi, and the 3rd party freeware component used by Denis is mentioned here: http://www.den4b.com/forum/viewtopic.php?pid=1814#p1814 So unfortunately, he doesn't have control over what the component can or cannot do, and you'll need to direct your criticisms to the component's author. (Or possibly even suggest a better freeware Delphi component to replace it.)
Offline
Narayan, although I had tried the case/fragment previously without success, however after your suggestion, I retried it, being a little more careful with the check box selection; it worked like a charm. Thanks.
Maybe you can suggest a solution for whole word capture for find and replace. I have to use the “word” followed by “space” with space acting as a delimiter, however even though this works most of the time it does not work if the search word is located at the very end of the file/folder name without a space following.
Andrew, does your comment apply to the find and replace code as well or is this Denis's very own code?
Thanks
Offline
Hi
Maybe you can suggest a solution for whole word capture for find and replace. I have to use the “word” followed by “space” with space acting as a delimiter, however even though this works most of the time it does not work if the search word is located at the very end of the file/folder name without a space following.
By default if you enter a word, ReNamer will not find a partial match for it (it will look for the entire word in the file names).
I suspect you actually meant "how to search for any of the specified words? (with logical OR relationship)".
In that case, you MUST NOT use any separator (such as space).
Instead, separate those words by clicking on the + button (located on the right side of the input box).
This inserts "|" in the box, which acts as a separator.
In fact, you can insert this string manually too: Just enter a double quote, SHFT+\ and again a double quote.
HTH.
Last edited by narayan (2012-09-08 05:40)
Offline
Narayan, your response was:
“By default if you enter a word, ReNamer will not find a partial match for it (it will look for the entire word in the file names).”
This statement is incorrect. This is why I posted the original entry request for find and replace. Please reread suggested improvements.
Try this test
File name – “A Music with Another Name”; do not enter quotes
set find to A
leave replace empty
the result is A disappears and Another becomes nother - “ Music with nother Name”
This would not happen if the code was set for whole word capture.
I also may have been hasty. Your case suggestion above does not work so I decided to write my own script as follows:
It almost worked but under ReNamer:Pascal Script:Unicode String Handling Routines section 1.7 on
Making first letter capital
“WideCopy(WideUpperCase????) function will let us capitalize only the first LETTER (alphas) of the filename.” This is inaccurate.
Try the following filename: 1 -- a we are the that as a the another
Apply script: FileName := WideUpperCase(FileName[1])
The WideUpperCase function finds the “letter” 1. This is not a letter but a number.
If WideUpperCase is going to capitalize a char, it should first check that char is a letter(alphas) and not a number or other non-alpha and it should be the first alpha that occurs in the title regardless of position or of the non alphas that may precede the first alpha.
The entire script to capitalize the first letter of the first word only while leaving the rest of the title untouched would look as follows:
FileName := WideUpperCase(FileName[1]) + WideCopy(FileName, 2, Length(FileName)-1);
Please correct the nuisances.
Thanks
PS Maybe we should continue this post under Bugs or Help and Support?
PPS where are all the scrip codes? I did a search and came up empty even under Scripter. Just where is the download link for Scripter? All contributed scripts should have at least one web page dedicated for listings and download. Frustrating!
Offline
PPS where are all the scrip codes? I did a search and came up empty even under Scripter. Just where is the download link for Scripter? All contributed scripts should have at least one web page dedicated for listings and download. Frustrating!
Script cookbook and repository: http://www.den4b.com/wiki/ReNamer:Pasca … t_cookbook
Offline
Thanks Andrew, the link provided is very useful.
Offline
Regex223, my statement is correct, but I misunderstood you, since you were trying to enter a space.
In that context my point was ReNamer won't try to match a part of the entered word.
For example, if the word you enter is "running", it won't look for a partial match, like "run".
Then I went on to suggest how to avoid using space as separator.
If it is about a WHOLE word, how about using RegEx rule and then use \b on both sides of your word?
That should give you fine control on whether you want a word-boundary on either/both sides of the word.
Last edited by narayan (2012-09-10 06:41)
Offline
Pages: 1