2

Recently I noticed a strange directory whose name is foo.. When double-clicking it to view its content, I found it to be identical to foo. I then deleted foo and tried to view foo. again, but Windows Explorer said it not found. If I attempt to delete foo., foo is gone instead. Refreshing Explorer, rebooting will not erase foo., and raw disk browser still shows it's there. Also RD foo.\ cannot remove foo., but foo as well.
I'm curious about this "trailing dot mechanics". Can anyone explain its strange behavior?

2
  • What windows version are you using, and is this folder located on your harddrive or a network location? In windows 10, a folder with . is treated as if it is without
    – LPChip
    Commented Apr 28, 2017 at 12:41
  • @LPChip I tried to find out but it seems to make no difference across XP, 7 and 10. It's on an NTFS volume.
    – iBug
    Commented Apr 28, 2017 at 12:51

1 Answer 1

4

In windows, the . character is a separator for extensions. When you have a folder, by default, it has no extension. A folder ending with a period basically is the same, a folder with no extension.

Although they both show up, internally they are referred as the same. So deleting one will delete both, but explorer is not smart enough to understand that which is why you still see it. If you want a folder that ends with a ., add a space behind the dot. Do note, the space has to be ALT+255. That way, a folder has the extension space and as such it is different, while by appearance it will look the same.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .