Re: dot (.) files and directories



Wesley Vogel wrote:

The period (.) cannot be the first or only character in the filename or
foldername.

<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

<quote>
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).
<quote>
from...
You cannot delete a file or a folder on an NTFS file system volume
http://support.microsoft.com/?kbid=320081

<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.

Using Windows Explorer:
It is possible to save a file as .txt no name, just an extension.

It is possible to name a folder with a space, i.e. no name.

For some of the other restrictions you have to use a command prompt, not
windows Explorer.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User


(1) Is "." really a forbidden character? There are 20 files / folders
in my computer, with names starting with a dot ".": e.g., ".NET
Framework Config" ".log" (in Program Files\Getright). These were all
created during installation by the programs being installed. I haven't
tried naming any file starting with a dot.
(2) Re: filenames with trailing dots: Last year, I received an email
message with the subject line: "Road Signs , It happens only in INDIA
......" (note the trailing dots) from a friend. I saved it on the
desktop as a file, and it got saved with the name "Road Signs , It
happens only in INDIA ....." Later, when I tried to delete it, it
turned into a zero byte file, and could not be deleted by the normal
methods. I could get rid of it only after using a utility called
DelinvFile.exe, available from
<a>http://www.purgeie.com/delinv/index.htm</a>. Was the problem created
by the "trailing dots" in the file name?

.



Relevant Pages

  • Re: Why cant file name end in a period?
    ... Although the underlying file system may support such names, the operating ... The first three examples have the file extensions .txt, .Data, and .report. ... not to be in control of how Save dialogs handle forbidden characters. ...
    (microsoft.public.windowsxp.basics)
  • pulling apart, padding out and re-assembling a pasted alphanumeric text string....
    ... if I was to give a quote today and I mine was the ... paste into my system to translate it into the full number used as the ... That removes any trailing numbers not needed from the pasted number ... say, grab the first two digits, set them aside as year, grab the next ...
    (comp.databases.ms-access)
  • Re: pulling apart, padding out and re-assembling a pasted alphanumeric text string....
    ... What I have is a system that needs to traslate a pasted string of data ... if I was to give a quote today and I mine was the ... That removes any trailing numbers not needed from the pasted number ... You can use Format to zero pad. ...
    (comp.databases.ms-access)
  • Re: Spell checkers?
    ... > leading or trailing double quote in as part of the word) and therefore ... Is this just a matter of configuring quote ... It is fine with recognising and parsing phrases delimited by single quotes ... Lauchlan M ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Event Matchmaker updated
    ... "Nerd" posted a full quote 152 lines long, including some trailing ... Learn to shorten your quotes to the shortest possible amount if you want anyone to find and/or read what you write below. ...
    (rec.juggling)