• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

Can't create files/folders ending in dot (.) character...

Question

somethingthatrhymes    0

I can't create a folder ending in a dot. Windows doesn't complain, it simply renames the folder without the dot, without telling me.

I've tried the usual "do it in command prompt" with echo > , rename, and mkdir. I've created it in Linux (neither FAT nor NTFS complain), but as soon as Windows sees the folder, it just goes ahead and removes the dot!

What's the deal? Is there a way to bypass this and create a folder with a trailing dot? Why does MS do these silly things? (I actually am pretty interested in the reasoning behind this)

EDIT: Google shows me some people that have files/folders ending in dots are having troubles deleting them, but doesn't tell me how to create them. (I'm not worried about deleting them afterwards - I can just use Linux, which handles them sanely, or whatever voodoo that those people out there are using)

Edited by somethingthatrhymes

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
+BudMan    3,610

I have to wonder WTF you would want to do this for?

http://msdn2.microsoft.com/en-us/library/aa365247.aspx

Naming a File

Naming Conventions

The following rules enable applications to create and process valid names for files and directories regardless of the file system:

# Do not end a file or directory name with a trailing space or a period. Although the underlying file system may support such names, the operating system does not. You can start a name with a period (.).

Share this post


Link to post
Share on other sites
  • 0
somethingthatrhymes    0

Well basically I just want to do it for compatibility between OSes.

Although the underlying file system may support such names, the operating system does not.
But... WHY?!?!? It's _just another character_. There shouldn't be anything special about dots. In *nix, filenames can contain anything but NULL (yes, even \t, \n, etc.), since it's the string terminator. I'm just baffled by why dots are so bad.

Share this post


Link to post
Share on other sites
  • 0
night_stalker_z    9

There are quite a few names or characters which Windows wont let you use like the dot at the end. Its probably due to the incompatibilties between Windows XP/Vista and Windows 95/98.

Share this post


Link to post
Share on other sites
  • 0
Fred Derf    217
But... WHY?!?!? It's _just another character_. There shouldn't be anything special about dots. In *nix, filenames can contain anything but NULL (yes, even \t, \n, etc.), since it's the string terminator. I'm just baffled by why dots are so bad.

There are a great many characters that are not allowed including question marks, apostrophes and various slashes. Windows still has many of the original DOS limitations (something that now dates back multiple decades). It's just there. Live with it.

Share this post


Link to post
Share on other sites
  • 0
Will L    0
On 11/12/2007 at 4:10 PM, BudMan said:

I have to wonder WTF you would want to do this for?

http://msdn2.microsoft.com/en-us/library/aa365247.aspx

Naming a File

Naming Conventions

The following rules enable applications to create and process valid names for files and directories regardless of the file system:

# Do not end a file or directory name with a trailing space or a period. Although the underlying file system may support such names, the operating system does not. You can start a name with a period (.).

Windows is designed for manual point-and-click mechanics, which creates conflict and friction for those of us who develop software. Example: https://github.com/ropensci/drake/issues/1147. Here, the user does not deliberately try to create a file ending with a dot, but the software needs one anyway. This is just one of many edge cases caused by strange Windows file name restrictions. Fine for point-and-click Windows users,    frustrating for developers.

Edited by Will L

Share this post


Link to post
Share on other sites
  • 0
adrynalyne    12,728
1 hour ago, Will L said:

Windows is designed for manual point-and-click mechanics, which creates conflict and friction for those of us who develop software. Example: https://github.com/ropensci/drake/issues/1147. Here, the user does not deliberately try to create a file ending with a dot, but the software needs one anyway. This is just one of many edge cases caused by strange Windows file name restrictions. Fine for point-and-click Windows users,    frustrating for developers.

Only 12+ years too late. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.