Renaming multiple files with cm_RenameOnly and ‘/’
Moderators: Hacker, petermad, Stefan2, white
Renaming multiple files with cm_RenameOnly and ‘/’
When renaming multiple files with cm_RenameOnly you can use a backslash ‘\’ to rename files to a folder, for example “..\*.*” will move all selected files to the parent folder. Using the “alternate” path separator (because it does work like one) slash ‘/’ also works, but destroys the file name. Expected behavior would be for “../*.*” to act the same way as “..\*.*” (and any similar path specification).
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Can you give me an example of what you use as rename string, please?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Create a directory called “a” and two files called “123” and “456”, respectively. Then select both files and enter “a/*.*” in the “Rename/Move 2 file(s) to” dialog and execute. You will now have file called “3” and a file called “6” in the directory called “a”.
If you use “a\*.*” instead you wind up with two files called “123” and “456”, respectively, as expected.
If you use “a\*.*” instead you wind up with two files called “123” and “456”, respectively, as expected.
Confirmed, the same with copy/move via F5/F6.
It seems that always the first two characters of the file name are killed:
File "12345678.123" gets "a/3456789.123".
File "12.345" gets "a/.345"
File "12" produces an error message (Screenshot, target was a/*.*):
It seems that always the first two characters of the file name are killed:
File "12345678.123" gets "a/3456789.123".
File "12.345" gets "a/.345"
File "12" produces an error message (Screenshot, target was a/*.*):
Cannot write [path]\a/!
Please remove write protection!
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Indeed TC sees the slash as a part of the name of the file - only windows itself later interprets it as a directory delimiter...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I will consider this - but it would require a lot of changes in 1000s of places in the program...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact: