[TC10.0] Can not remove a directory with trailing dots

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
andry81
Junior Member
Junior Member
Posts: 97
Joined: 2018-11-22, 19:17 UTC

[TC10.0] Can not remove a directory with trailing dots

Post by *andry81 »

  • Windows 7 x64
You can create a directory with trailing dots using cmd.exe:
mkdir "a...\"
mkdir \\?\c:\blabla\a...`
To remove:
rd "a...\"
or
rd \\?\c:\blabla\a...
TC can not remove such directories.
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: [TC10.0] Can not remove a directory with trailing dots

Post by *Usher »

Really?
Go to Configuration -> Options -> and turn OFF "Use long names". Then delete DOS name...
You can do the same from the command line:

Code: Select all

mkdir "a...\"
dir /x
rmdir A79E5~1
dir
Edit: What is more, TC can create names with symbols that are NOT-A-CHARACTER (U+FFFF) in Unicode. You can try with the following name:

Code: Select all

矎矎<character deleted><character deleted>@
Some characters may be wrongly displayed, depending on used browser and OS, but it should be properly copied and pasted by Windows clipboard.

Moderator message from: white » 2023-02-02, 12:27 UTC

Removed the "Not a Character" Unicode characters because forum search cannot properly handle these characters.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC10.0] Can not remove a directory with trailing dots

Post by *ghisler(Author) »

There are file names which are forbidden for Windows functions, but the underlying file system supports them. Accessing such files/folders fails with normal Windows functions. Total commander has some limited support for such names. Deleting such folders isn't currently supported. You need to rename the folder before you can delete it.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC10.0] Can not remove a directory with trailing dots

Post by *white »

The problem is when trying to delete "a." or "a.." or "a...", it will delete "a". Luckily it only succeeds if a is empty.
ghisler(Author) wrote: 2022-06-24, 07:17 UTC You need to rename the folder before you can delete it.
Or first execute "cd \\?\c:\blabla" on TC's command line.
Post Reply