Search and Replace
Posted: 07 Apr 2005 08:18
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.
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
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.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.
That sounds good. On the other side sometimes it could be usefull to rename files e.g. from ".html" to ".xhtml"...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!
4. introduce RegExp here as well. (IMHO the best)peterbonge wrote:That sounds good. On the other side sometimes it could be usefull to rename files e.g. from ".html" to ".xhtml"...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!
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
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.peterbonge wrote:...sometimes it could be usefull to rename files e.g. from ".html" to ".xhtml"...
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".Gandolf wrote:... basename (as it used to be called - filetitle as you call it) ...
Have a try with the next BETA...RalphM wrote:introduce RegExp here as well
Wow! Really powerfull!admin wrote:Have a try with the next BETA...RalphM wrote:introduce RegExp here as well
Hmm... good idea! I won't do it for the 4.0 release, but this would be something for 4.1 ...peterbonge wrote:Or maybe it is time for a new [rename] tab in the info panel? This would offer a lot of possibilities.
Did it, and went for option 2: to exclude the extension from the replace action suffix <. to the command.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