dot (.) files and directories

  • Thread starter Thread starter kramer.newsreader
  • Start date Start date
K

kramer.newsreader

My ssh client is trying create a fdirectory ".ssh" and it is giving an
error, so I tried to create that directory and can't. In fact, I can't
create any file name starting with a '.' I get the error message 'You
must type a file name'. I could have sworn that I'd created such files
in the past...



According to this:
http://blogs.msdn.com/brian_dewey/archive/2004/01/19/60263.aspx, the
NTFS/POSIX subsystem has few constraints and the Win32 subsystem (which
should be the bottleneck here restricts trailing dots and spaces and
name length, but I don't see anything about begining with a '.'

If Win32 truly does not allow filenames starting with a '.', then could
I advocate strings up the retards at MS would made such a design
decision. Is there something funny going on with my system or is this
another case where Linux/OS X/every other OS I've used is superior?
 
My ssh client is trying create a fdirectory ".ssh" and it is giving an
error, so I tried to create that directory and can't. In fact, I can't
create any file name starting with a '.' I get the error message 'You
must type a file name'. I could have sworn that I'd created such files
in the past...



According to this:
http://blogs.msdn.com/brian_dewey/archive/2004/01/19/60263.aspx, the
NTFS/POSIX subsystem has few constraints and the Win32 subsystem (which
should be the bottleneck here restricts trailing dots and spaces and
name length, but I don't see anything about begining with a '.'

If Win32 truly does not allow filenames starting with a '.', then could
I advocate strings up the retards at MS would made such a design
decision. Is there something funny going on with my system or is this
another case where Linux/OS X/every other OS I've used is superior?

Of course they are superior in more ways than just the ability to create dot
files. If you need to ssh to a server, why use Windoze in the first place?
Run a Linux box and do it from there.


--
WGA is the best thing that has happened for Linux in a while.

The ULTIMATE Windoze Fanboy:

http://video.google.com/videoplay?docid=-2370205018226686613

Is this a modern day equivalent of a Nazi youth rally?:

http://www.ntk.net/media/developers.mpg

A 3D Linux Desktop (video) ...


View Some Common Linux Desktops ...
http://shots.osdir.com/
 
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

In
 
Wesley said:
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?
 
(1) Is "." really a forbidden character?

No it is not forbidden. If it is used as a trailing... it can be tough to
get rid of the folder.

If used in the normal manner, some-name.some-extension there are no
problems.

If used like Boot.ini.txt or WIN.INI and SYSTEM.INI and XP.txt no
problem.
I haven't tried naming any file starting with a dot.

Try it, you get:

---------------------------
Rename
---------------------------
You must type a file name.
---------------------------
OK
---------------------------

They can be named with a leading period, but not with Windows Explorer. You
have to use a command prompt or some other method. I.e. like MD or Xcopy or
piping to a file.

Do a Save As with Notepad.

Try to save as * No error, just won't save.

Try to save as . No error, just won't save.

---------------------------
Save As
---------------------------
"
The above file name is invalid.
---------------------------
Save As
---------------------------
/
The above file name is invalid.
---------------------------

Try to save as \ No error, just won't save.

Save As[/QUOTE]
The above file name is invalid.
---------------------------
Save As
---------------------------
|
The above file name is invalid.
---------------------------
(2) Re: filenames with trailing dots

I have two on my machine, .ini File.ico & .index.html
Was the problem created
by the "trailing dots" in the file name?

I think that is a reasonable assumption.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
witan said:
Wesley said:
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?
 
So everyone is right.

NoStop, yes Linux is better.

Wesley,

Yes you can create files with those names, but not with Windows
Explorer. The ssh client that I use apparently uses the wrong file
create mechanism. One that goes through Windows Explorer.

I challenge anyone from Microsoft to explain to me why this is not
allowed in Windows Explorer.

It's a standard naming convention for configuration files.
 
Yes you can create files with those names, but not with Windows
Explorer. The ssh client that I use apparently uses the wrong file
create mechanism. One that goes through Windows Explorer.

"The shell and the file system may have different requirements. It is
possible to create a path with the API that the shell UI cannot handle."
Naming a File
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp

From David Candy
<quote>
NTFS is the file system used by NT.
NTFS have their own limits and rules (generally not specified by MS).

If a unix program saves a file using a legal unix name but an illegal
Windows name then only unix stuff can access the file.
<quote>

Same for Posix or Interenix or Linux.

<quote>
POSIX Compliance
NTFS provides Portable Operating System Interface for UNIX (POSIX)
compliance, which permits UNIX programs to be ported to Windows 2000.
Windows 2000 is fully compliant with the Institute of Electrical and
Electronic Engineers (IEEE) standard 1003.1, which is a standard for file
naming and identification.

The following POSIX-compliant features are included in NTFS:

* Case-sensitive naming. For example, POSIX interprets README.TXT,
Readme.txt, and readme.txt as separate files.
* Hard links. A file can have more than one name. This allows two different
file names, which can be in different folders, to point to the same data.
* Additional time stamps. These show when the file was last accessed or
modified.

Caution You must use POSIX-based programs to manage file names that differ
only in case. You cannot use standard Windows 2000 command-line tools (such
as copy, del, and move, or their equivalents in Windows Explorer) to manage
file names that differ only in case. For example, if you type del MyDoc.Doc
at the command prompt, both mydoc.doc and MyDoc.Doc are deleted.
<quote>
from...
Chapter 17 - File Systems
http://www.microsoft.com/technet/prodtechnol/Windows2000Pro/reskit/part3/proch17.mspx?mfr=true

Try using Rename (ren) or other command in a command prompt.
I challenge anyone from Microsoft to explain to me why this is not
allowed in Windows Explorer.

www.microsoft.com

See...
The following rules enable applications to create and process valid names
for files and directories regardless of the file system
here...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Back
Top