Page 1 of 1

Search and Replace

Posted: 07 Apr 2005 08:18
by peterbonge
When I'm removing all periods from a filename the period of the file extension will also be removed -> the file has no extension anymore.

Re: Search and Replace

Posted: 07 Apr 2005 09:23
by admin
peterbonge wrote:When I'm removing all periods from a filename the period of the file extension will also be removed -> the file has no extension anymore.
Hmm, how to solve this? Extensions nowadays are not what they have been in DOS times (where there was no "." as a character but 8 characters filetitle + 3 characters extension conventionally *displayed* with dot inbetween. Now an "extension" is the part of the filename after the last dot, but the dot is also part of the filename. So when you remove all dots, all dots are removed. The function does what it claims to do.

However, what I could do is: apply all Search and Replace operations only to the filetitle (that's the part of the filename before the last dot)! I think that would make a lot of sense. So when you replace all "x" characters by "y" in some "*.txt"-files, they still will be "*.txt"-files and not "*.tyt"-files!

Re: Search and Replace

Posted: 07 Apr 2005 10:29
by peterbonge
admin wrote:However, what I could do is: apply all Search and Replace operations only to the filetitle (that's the part of the filename before the last dot)! I think that would make a lot of sense. So when you replace all "x" characters by "y" in some "*.txt"-files, they still will be "*.txt"-files and not "*.tyt"-files!
That sounds good. On the other side sometimes it could be usefull to rename files e.g. from ".html" to ".xhtml"...
Maybe you can make:
1. two commands. One for the file title only and one for the whole filename (incl. dot).
2. a special option or checkbox in the rename box for replacing in the whole filename.
3. a option in the configuration

Re: Search and Replace

Posted: 07 Apr 2005 18:38
by RalphM
peterbonge wrote:
admin wrote:However, what I could do is: apply all Search and Replace operations only to the filetitle (that's the part of the filename before the last dot)! I think that would make a lot of sense. So when you replace all "x" characters by "y" in some "*.txt"-files, they still will be "*.txt"-files and not "*.tyt"-files!
That sounds good. On the other side sometimes it could be usefull to rename files e.g. from ".html" to ".xhtml"...
Maybe you can make:
1. two commands. One for the file title only and one for the whole filename (incl. dot).
2. a special option or checkbox in the rename box for replacing in the whole filename.
3. a option in the configuration
4. introduce RegExp here as well. (IMHO the best)

Posted: 08 Apr 2005 08:34
by Gandolf
peterbonge wrote:...sometimes it could be usefull to rename files e.g. from ".html" to ".xhtml"...
Agreed. The option to rename either the basename (as it used to be called - filetitle as you call it) or the extension would be useful.

Posted: 08 Apr 2005 08:52
by admin
Gandolf wrote:... basename (as it used to be called - filetitle as you call it) ...
Oh, that's correct, it's basename. I mixed that up. Filetitle I think is sometimes used for the filename "without path" as opposed to "with full path".

Re: Search and Replace

Posted: 08 Apr 2005 10:34
by admin
RalphM wrote:introduce RegExp here as well
Have a try with the next BETA... 8)

Re: Search and Replace

Posted: 08 Apr 2005 22:49
by peterbonge
admin wrote:
RalphM wrote:introduce RegExp here as well
Have a try with the next BETA... 8)
Wow! Really powerfull!

But in the meantime the rename menu is a little bit bloated. I think the html, spaces and umlaut entries can be removed. This all can be done easily with the RegExp.
Or maybe it is time for a new tab in the info panel? This would offer a lot of possibilities.

Re: Search and Replace

Posted: 09 Apr 2005 11:03
by admin
peterbonge wrote:Or maybe it is time for a new [rename] tab in the info panel? This would offer a lot of possibilities.
Hmm... good idea! I won't do it for the 4.0 release, but this would be something for 4.1 ...

Re: Search and Replace

Posted: 20 Jul 2005 18:14
by admin
peterbonge wrote:... sometimes it could be usefull to rename files e.g. from ".html" to ".xhtml"...
Maybe you can make:
1. two commands. One for the file title only and one for the whole filename (incl. dot).
2. a special option or checkbox in the rename box for replacing in the whole filename.
3. a option in the configuration
Did it, and went for option 2: to exclude the extension from the replace action suffix <. to the command.
For example (menu Search and Replace):
.html/.xhtml -> will replace the extension
./,<. -> will replace all dots by commas, but not the extension dot