Copy folder with different name - dot is left in the name

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
GrimReaper85
Junior Member
Junior Member
Posts: 15
Joined: 2020-06-22, 20:15 UTC

Copy folder with different name - dot is left in the name

Post by *GrimReaper85 »

It's pretty simple, in left panel I have some folder, let's say it's named TEST
If I use F5, Total Commander already gives me:
C:\TEMP\*.*

Now I want to copy this folder, but give it different name, TEST - 2
I tried everything, but I get the best result if I use this:
C:\TEMP\*.* - 2

Now I get a copy of folder TEST named TEST. - 2
And then I have to rename it to TEST - 2

How can I do this without the dot in the name?
Last edited by GrimReaper85 on 2020-07-15, 15:03 UTC, edited 1 time in total.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Copy folder with different name - dot is left in the name

Post by *MVV »

You can just type new name instead of *.*, e.g. C:\TEMP\TEST - 2. You only need mask if you have selected more than one item.

Note than you can press F5 multiple times to select different parts of suggested path for editing. E.g. focus TEST folder, press F5 three times and type TEST - 2 over selected *.* to get C:\TEMP\TEST - 2.
Last edited by MVV on 2020-07-15, 14:41 UTC, edited 2 times in total.
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Copy folder with different name - dot is left in the name

Post by *Usher »

GrimReaper85
If you want to have another copy in the same folder, use Shift+F5.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Copy folder with different name - dot is left in the name

Post by *Stefan2 »

GrimReaper85 wrote: 2020-07-15, 05:41 UTC It's pretty simple, in left panel I have some folder, let's say it's named TEST.
You have a folder named "TEST." ?

How did you create that, as trailing dots are not supported by the file system API ?
Or is that an Unicode sign just looking like an ordinary dot?
So tools like TC are tricked out.

?




 
GrimReaper85
Junior Member
Junior Member
Posts: 15
Joined: 2020-06-22, 20:15 UTC

Re: Copy folder with different name - dot is left in the name

Post by *GrimReaper85 »

I tried not using periods here just because of this, seems I left this one, corrected now.

I'm satisfied with other 2 answers, thanks.

EDIT:
Let's say I want to copy multiple folders, now I'm back to my question, I still have dots in name if I use "*.*" and I don't know what else I can use, just "*" gives me nothing.
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Copy folder with different name - dot is left in the name

Post by *tuska »

HISTORY.TXT wrote: 30.05.18 Release Total Commander 9.20 beta 5 (32/64)
27.05.18 Added: Shift+F7 new folder in target panel: Return to source panel when the user cancels the input of the new name (32/64)
1. Cursor on folder "TEST" in left panel
2. SHIFT+F7 (new folder in target panel)
3. Press the end key, type in ' - 2', <enter>
4. folder "TEST - 2" ist created in right panel
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Copy folder with different name - dot is left in the name

Post by *Stefan2 »

Ah, now I see

Test
F5 > C:\TEMP\*.* - 2
Test. - 2

TC adds that dot itself on expanding name and extension part, and put that dot there in, because " - 2" is now the extension.
Other syntax than *.* doesn't work in the F5 copy dialog on my tests.



If you need that more often you can use an own command (user defined or button) like:

Code: Select all

TOTALCMD#BAR#DATA
cmd /k
?Xcopy /E /I %P%N "%T%O - 2"
%COMMANDER_EXE%,2
Copy Folder To Target And Add an " - 2"


-1
(copy and paste button-code)
See help for xcopy for more parameters     ( like good old /KREICH ;-) )



For more than one folder we have to extend that command and include a for loop ( for /f in ("%F") Do xcopy... )
NotNull
Senior Member
Senior Member
Posts: 269
Joined: 2019-11-25, 20:43 UTC
Location: NL

Re: Copy folder with different name - dot is left in the name

Post by *NotNull »

  • Select your folders
  • Press F5
  • In the "Copy n file(s) to:" field, replace *.* with:

    Code: Select all

    ???????????????????? -2
    (Use more ? 's than the number of characters in the longest foldername)
  • Press OK button
  • Done


Stefan2 wrote: 2020-07-15, 14:59 UTC How did you create that, as trailing dots are not supported by the file system API ?
Or is that an Unicode sign just looking like an ordinary dot?
So tools like TC are tricked out.
In TC, press F7 and enter this for the foldername:

Code: Select all

\\?\C:\deleteme.
(Rename it to something else to delete it)
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Copy folder with different name - dot is left in the name

Post by *Stefan2 »

NotNull wrote: 2020-07-15, 20:45 UTC ...

In TC, press F7 and enter this for the foldername:

Code: Select all

\\?\C:\deleteme.
(Rename it to something else to delete it)
OK, if you disable the API by using \\?\ and so negotiate the string parsing, accessing the file system directly :wink:

Nice you tested it for us, good to know that it really works that way, thanks.



 
GrimReaper85
Junior Member
Junior Member
Posts: 15
Joined: 2020-06-22, 20:15 UTC

Re: Copy folder with different name - dot is left in the name

Post by *GrimReaper85 »

All sugestions are fine, but easiest and least likely to forget seems to be what I was doing now, for up to 5-10 folders that is.
But if you help yourself with CTRL+M, number of folders is not a problem.
I'll surely remember that ? mark solution, but it's easier to delete dots after than to type that many question marks.
NotNull
Senior Member
Senior Member
Posts: 269
Joined: 2019-11-25, 20:43 UTC
Location: NL

Re: Copy folder with different name - dot is left in the name

Post by *NotNull »

GrimReaper85 wrote: 2020-07-16, 09:25 UTC it's easier to delete dots after than to type that many question marks.
You are kidding. right?
Just press the key(s) for a "?" and keep them pressed down until you got enough.

Stefan2 wrote: 2020-07-15, 21:05 UTC Nice you tested it for us, good to know that it really works that way, thanks.
You're welcome!
FWIW: It's not bypassing any API's; most APIs support the Win32 namespace (\\?\ , \\.\ , ...) too.
GrimReaper85
Junior Member
Junior Member
Posts: 15
Joined: 2020-06-22, 20:15 UTC

Re: Copy folder with different name - dot is left in the name

Post by *GrimReaper85 »

You are kidding. right?
Just press the key(s) for a "?" and keep them pressed down until you got enough.
Sure, but that " - 2" was just one example. What if you have "bla - bla" and want to copy to "bla". In most cases you're down to CTRL+M if you have a lot of folders.
If you only have 2 folders or so like I'm having recently, then it doesn't really matter how you do it.
But usually you want to do it with the least keystrokes/mouse clicks as possible, and your solution depends heavily on folder name lengths.
Similar thing was when I suggested on one forum to enable some setting to use just CTRL+V for pasting without text format, others all thought CTRL+SHIFT+V was easier and I was left the weirdo.

It would be welcome if there was a tick to enable like you have in Windows, to automatically add " - copy" behind folder names, Total Commander just says "You cannot copy a file to itself!"
But fine, "*._" for example gives you the same thing.
GrimReaper85
Junior Member
Junior Member
Posts: 15
Joined: 2020-06-22, 20:15 UTC

Re: Copy folder with different name - dot is left in the name

Post by *GrimReaper85 »

This ? mark solution is actually not that bad now that I'm copying around 5 folders at a time. What I really like is that I will never forget it, it's so easy to remember.
Post Reply