Search and Replace

Things you’d like to miss in the future...
Post Reply
peterbonge
Posts: 354
Joined: 25 May 2004 21:53

Search and Replace

Post 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.
Regards,
Peter Bonge

My System: Windows 11 Pro, 64-bit, German

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Search and Replace

Post 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!

peterbonge
Posts: 354
Joined: 25 May 2004 21:53

Re: Search and Replace

Post 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
Regards,
Peter Bonge

My System: Windows 11 Pro, 64-bit, German

RalphM
Posts: 1935
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Search and Replace

Post 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)
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

Gandolf

Post 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.

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post 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".

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Search and Replace

Post by admin »

RalphM wrote:introduce RegExp here as well
Have a try with the next BETA... 8)

peterbonge
Posts: 354
Joined: 25 May 2004 21:53

Re: Search and Replace

Post 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.
Regards,
Peter Bonge

My System: Windows 11 Pro, 64-bit, German

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Search and Replace

Post 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 ...

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Search and Replace

Post 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

Post Reply