Why can't file name end in a period?

  • Thread starter Thread starter Guest
  • Start date Start date
A trailing period in a file or folder name is a no no.

Because you may not be able to delete a file if the file name includes an
invalid name (for example, the file name has a trailing space or a trailing
period or the file name is made up of a space only).

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
I wanted to name a file misc., but the period won't stay.

Thanks,

Norm Strong

It goes back the the days of DOS. Someday it may be changed, but not
for now. That period has a special meaning. It is not just a character.
 
<quote>
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.
<quote>
from...
Naming a File
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp

You probably have file extensions turned off, which is not a good thing.

Start | Settings | Control Panel | Folder Options | View tab |
UNCheck: Hide extensions for known file types


<quote>
The file extension is the part of a file name that comes after the final
period. For example:

readme.txt
Animal.Mammal.Rodent.Mouse.Data
Performance Analysis for January 1.report
datafile

The first three examples have the file extensions .txt, .Data, and .report.
The last file has no extension.

File extensions typically hint at the type of data a file contains. The
Shell uses file extensions to define a file's type. The Shell determines
its treatment of a certain file by examining the file's type. This is the
basis for file associations.

Note A file name extension is not a certain way to determine the type of
data a file contains. It suggests, but does not guarantee, that a file
contains a certain type of data.
<quote>
from...
File Extensions
http://msdn.microsoft.com/library/d...nding/fileassociations/fa_file_extensions.asp

<quote>
XP restricts the use of the * . " / \ [ ] : ; | = , characters in a file or
folder's name. When you try to type a forbidden character in a
file's name, XP tells you:

A file name cannot contain any of the following characters:
\ / : * ? " < > |

This is a very explicit and helpful message. Additionally, XP will not let
you begin a filename with a space or a dot. If you attempt to begin a
filename with a space, the space is ignored. If you attempt to begin a
filename with a dot, you'll get an error that simply says "You must type a
file name" and offers no further explanation.

If you try to save a file from within an application's Save dialog box with
a forbidden character, this is the error message that results:

sample>filename
The above file name is invalid.

XP discloses that the problem is with the file's name, but it leaves it up
to the user to figure out how to resolve the issue. Most users will probably
assume what the offending character is, but it would be much more helpful if
XP simply told user like it does when working in the filesystem.

The way XP applications handle saving files does not seem to be driven
exclusively by the operating system. We tried this same experiment with
Microsoft Word, which produced three different errors depending on the
different forbidden characters used. We mention this not as a third-party
software example, but rather to illustrate that the operating system seems
not to be in control of how Save dialogs handle forbidden characters.
<quote>
from...
Forbidden Characters in Filenames - XvsXP.com, Mac OS X vs. Windows XP
http://www.xvsxp.com/files/forbidden.php

There are ways around some of the restrictions, but trying to delete the
file or folder with illegal characters can be a real pain.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
I wanted to name a file misc., but the period won't stay.

Even though Windows supports more than A-Z 0-9 and _, then don't use
anything else. I've seen MS Word crap out when doing a search in a
folder with files named "Some Person, Ph.D., CCDC-III, X Y Z,
PDQ.WEST.doc".

I tell people if it's not letters, numbers or the Underscore, don't use
it.

The above example would have ended up being this:

"WEST_LAST_FIRST.DOC" as none of the other crap means anything for a
file name.
 
Wesley Vogel said:
A trailing period in a file or folder name is a no no.

Because you may not be able to delete a file if the file name includes an
invalid name (for example, the file name has a trailing space or a
trailing
period or the file name is made up of a space only).

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In

Are there any non-printing characters I could put after the period so that
it would look right?

Norm
 
Norm,

I'm not exactly sure what you are trying to accomplish, but I would just
name the file misc and forget the period.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Joseph Meehan said:
It goes back the the days of DOS. Someday it may be changed, but
not for now. That period has a special meaning. It is not just a
character.

But in DOS you could give a file a name "xyz." couldn't you - it just
meant there was no extension. Or do I remember wrong?
 
Jeremy said:
But in DOS you could give a file a name "xyz." couldn't you - it just
meant there was no extension. Or do I remember wrong?

Frankly I don't remember. However my reference was really about the
special meaning of the " . " And it is the continuation of that special
meaning that is, I believe, at the root of the problem.
 
You can have filenames in XP with no extension also.

A couple of examples.
C:\ntldr
C:\WINDOWS\system32\drivers\etc\HOSTS
C:\WINDOWS\system32\drivers\etc\networks
C:\WINDOWS\system32\drivers\etc\protocol
C:\WINDOWS\system32\drivers\etc\services

<quote>
The file extension is the part of a file name that comes after the final
period. For example:

readme.txt
Animal.Mammal.Rodent.Mouse.Data
Performance Analysis for January 1.report
datafile

The first three examples have the file extensions .txt, .Data, and .report.
The last file has no extension.

File extensions typically hint at the type of data a file contains. The
Shell uses file extensions to define a file's type. The Shell determines
its treatment of a certain file by examining the file's type. This is the
basis for file associations.

Note A file name extension is not a certain way to determine the type of
data a file contains. It suggests, but does not guarantee, that a file
contains a certain type of data.
<quote>
from...
File Extensions
http://msdn.microsoft.com/library/d...nding/fileassociations/fa_file_extensions.asp

The FAT file system allows only the period delimiter in the filename. Under
FAT, you know that the three characters that come after the period are the
file extension; however, under file systems that support long filenames,
like NTFS, this is not true.

File names in Windows XP can be up to 255 characters and can contain spaces,
multiple periods, and special characters that are not allowed in MS-DOS file
names.

The 8.3 format means that files can have between 1 and 8 characters in the
file name. The name must start with a letter or a number and can contain
any characters except the following:

. " / \ [ ] : ; | = , * ? (space)

An 8.3 file name typically has a file name extension that is from one to
three characters long and has the same character restrictions. A period
separates the file name from the file name extension.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Back
Top