Multirenaming Tool - [N] - for folders with dot
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Multirenaming Tool - [N] - for folders with dot
Multirenaming Tool for files:
[N] - filename
[E] - extension
Multirenaming Tool for folder:
[N] - part of foldername before of last dot
I know [A] - filename+extension, but when renaming files and folder - this inconvenient.
I want [N] for folders is fullname of folders name.
Example for [N]:
folder.1
folder.2
file1.ext
file2.ext
[N] - filename
[E] - extension
Multirenaming Tool for folder:
[N] - part of foldername before of last dot
I know [A] - filename+extension, but when renaming files and folder - this inconvenient.
I want [N] for folders is fullname of folders name.
Example for [N]:
folder.1
folder.2
file1.ext
file2.ext
Re: Multirenaming Tool - [N] - for folders with dot
2monarch-lfv
If the file is: Readme_28.05.23?
If the file is: Readme_28.05.23?
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Multirenaming Tool - [N] - for folders with dot
2sa16
Files almost always have extensions. Folders do not have extensions.
To your question: the file "Readme_28.05.23" turns out to have the extension ".23" (which is most likely wrong in fact).
I mean folders, not files.
Files almost always have extensions. Folders do not have extensions.
To your question: the file "Readme_28.05.23" turns out to have the extension ".23" (which is most likely wrong in fact).
I mean folders, not files.
Re: Multirenaming Tool - [N] - for folders with dot
for the file system folders are also files...monarch-lfv wrote: 2023-05-28, 11:42 UTC Multirenaming Tool for files:
[N] - filename
[E] - extension
Multirenaming Tool for folder:
[N] - filename
[E] - extension
It does - if you use folders with extensions thats not tcs fault

Hoecker sie sind raus!
Re: Multirenaming Tool - [N] - for folders with dot
2monarch-lfv
It turns out that for a file you agree with cut 23, but for a directory Dir_28.05.23 you do not.
It turns out that for a file you agree with cut 23, but for a directory Dir_28.05.23 you do not.
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Multirenaming Tool - [N] - for folders with dot
2Sir_SiLvA
I use folder with dots? example:
Along with such folders in the same directory, there may be similar files but with their own extensions (for example, zip, rar). If I set any rule for renaming, I expect that both folders and files will be processed equally correctly. But instead I get a different result.
Example:
I use folder with dots? example:
- 2023.05.28
anyprogram v.1.2.312
e.t.c.
Along with such folders in the same directory, there may be similar files but with their own extensions (for example, zip, rar). If I set any rule for renaming, I expect that both folders and files will be processed equally correctly. But instead I get a different result.
Example:
- Prog v10.0.0.35798_Final (this is folder)
Prog v10.0.0.35798_Final.zip (this is file)
- v10.0.35798_Final
v10.0.zip
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Multirenaming Tool - [N] - for folders with dot
2sa16
Yes, I think so.
Yes, I think so.
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Multirenaming Tool - [N] - for folders with dot
Sorry, this is: [A6-10] (and ext is empty) won't give the right result either - zip extension will be lost.
How to be in that case?
How to be in that case?
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Multirenaming Tool - [N] - for folders with dot
Pure example:
Rename to:
The folder and file names are identical, except for the file extension (as all archivers usually do). That is, the renaming rule should also be essentially the same.
How to do it?
Code: Select all
Prog v10.0.0.35798 (folder)
Prog v10.0.0.35798.zip (file)
Code: Select all
v10.0.0 (folder)
v10.0.0.zip (file)
How to do it?
Re: Multirenaming Tool - [N] - for folders with dot
No the folder have the name Prog v10.0.0 and the extension 35798, the file has the name Prog v10.0.0.35798 and the extension zip.The folder and file names are identical
Try and rename the folder Prog v10.0.0.35798 to Prog v10.0.0.35798.zip - that is not possible because a(nother) file with that name already exists.
You can accomplish your task with Search & Replace - like here; https://tcmd.madsenworld.dk/searchandreplace.png
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Multirenaming Tool - [N] - for folders with dot
Stop right there! At this point we have to differentiate between what you as human being expectmonarch-lfv wrote: 2023-05-28, 14:07 UTCHere, the dot does not imply an extension, it is part of the folder name (namely, the folder name).
- 2023.05.28
anyprogram v.1.2.312
e.t.c.
and what the FileSystem does! You expect anyprogram v.1.2.312 to be the complete filename
but for the filesystem EVERY file (as said before folders are just files) is Name(DOTExtension)
No, your are wrong as you get equally correct results which are just not the results you want!monarch-lfv wrote: 2023-05-28, 14:07 UTC Along with such folders in the same directory, there may be similar files but with their own extensions (for example, zip, rar). If I set any rule for renaming, I expect that both folders and files will be processed equally correctly. But instead I get a different result.
https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathfindextensiona is
executed on both the same.
So what you want, is to suggest a new variable that "differentiates" between files and "folders".
But that would slow down TCs preview of the new filename as it had to check every file in
the list for being a "folder" and we all know how Christian likes stuff that slows TC down...
Hoecker sie sind raus!
Re: Multirenaming Tool - [N] - for folders with dot
Only using WinScriptsAdv.
options.ini:
Code: Select all
[Script]
ActiveScripts=...|BaseName
[BaseName]
Script=BaseName.js
content=Base name
extensions=*
FoldersPaths=1
Code: Select all
with(WSH.createObject('Scripting.FileSystemObject')){if(fileExists(filename)){content=getBaseName(filename)}else{content=getFileName(filename)}}
Overquoting is evil! 👎
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Multirenaming Tool - [N] - for folders with dot
2petermad
The fact that you can get out of the situation in this way - I know. But, you see, for such a simple example, a rather "complicated" solution.
2Sir_SiLvA
I agree, in terms of the file system everything is as you say. But from the point of view of common sense - the folder does not need an extension, as such. After all, even the total commander itself displays the entire folder name in Name column, and does not put the extension in the appropriate column when displayed in Full mode, like files.
2Fla$her
Thanks, about WinscriptAdv, I know that it is possible. You can get the full name, but use part of it - unfortunately not. Again to write (or edit) the script for the elementary operation?
I would like to see this functionality in the Total Commander itself. Since I think that this is a fairly simple case that many users face. Zip up any folders that contain dots in their names, and then try to rename with some sort of rule for name along with the files.
The fact that you can get out of the situation in this way - I know. But, you see, for such a simple example, a rather "complicated" solution.
2Sir_SiLvA
I agree, in terms of the file system everything is as you say. But from the point of view of common sense - the folder does not need an extension, as such. After all, even the total commander itself displays the entire folder name in Name column, and does not put the extension in the appropriate column when displayed in Full mode, like files.
Maybe make a new parameter in the dialog box Multi-Rename tool for such cases? Although this will slow down the work, it will do the renaming as the user wishes.Sir_SiLvA wrote: 2023-05-28, 15:17 UTC But that would slow down TCs preview of the new filename as it had to check every file in
the list for being a "folder" and we all know how Christian likes stuff that slows TC down...
2Fla$her
Thanks, about WinscriptAdv, I know that it is possible. You can get the full name, but use part of it - unfortunately not. Again to write (or edit) the script for the elementary operation?
I would like to see this functionality in the Total Commander itself. Since I think that this is a fairly simple case that many users face. Zip up any folders that contain dots in their names, and then try to rename with some sort of rule for name along with the files.
Re: Multirenaming Tool - [N] - for folders with dot
Writing Prog |.35798 in the Search field seems less complicated than the WinscriptAdv approach.The fact that you can get out of the situation in this way - I know. But, you see, for such a simple example, a rather "complicated" solution.

License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Multirenaming Tool - [N] - for folders with dot
2petermad
Ok, let's make it a little more difficult:
Rename (character 6 to 10) to:
Your method won't work anymore. It will be very labor intensive. It will be faster to manually rename. And the more such pairs of folders-files, the more impossible it is to automate (only with a script). Although it should look like a simple renaming procedure.
Ok, let's make it a little more difficult:
Code: Select all
Fold v11.0.0.anyInformation (folder)
Prog v10.0.0.35798 (folder)
Fold v11.0.0.anyInformation.zip (file)
Prog v10.0.0.35798.zip (file)
Code: Select all
v11.0 (folder)
v10.0 (folder)
v11.0.zip (file)
v10.0.zip (file)