file naming conventions

  • Thread starter Thread starter T Hunt
  • Start date Start date
T

T Hunt

What is the maximum length allowed for a filename in
Windows XP? Where can I find the latest
limitations/restrictions?
 
Depends on your file structure format. DOS using the
standard File Allocation Format Table (FAT)is limited to
what the old timers call the eight dot three or 8.3 when
using processors that were 16 bit. This means the
filename can't be longer that 8 characters long. Then
came the 32bit processors and with them the FAT32 file
format which allowed I believe filenames at least 32
characters long (might be wrong on the max number). The
large filenames carry to the NT File System (NTFS) in
WinNT, Win2000 and XP. The extensions, filename.xxx, are
still limited to 3.

Bill
 
Actually with ME, 2000 & XP there can be as many characters after the . as
you want.


And you can have multiple dots, so filenames of the format
abcdefg.hij.klm.nop are valid.

--
Ken Blake
Please reply to the newsgroup

Interestingly enough, although NTFS can handle filenames of up to 255
characters, files created from the command line can only have filenames up
to 253 characters.

The special characters that cannot appear in an NTFS filename are as
follows:
? " / \ < > * | :

WARNING:
Using any 16-bit program such as the Windows 3.x File Manager or a DOS
utility such as Norton Commander to manipulate files that have long
filenames will destroy the long filenames! If this is on an NTFS volume, all
the security information will be eliminated as well! Only use 32-bit
programs that support long filenames to move or copy files on an NTFS
volume.

The filename does include the entire path so the file called fict.bat will
be at a minimum of 11 characters long (C:\fict/bat) or if it is C:\Documents
and Settings\LVTravel\My Documents\Documents\fict.bat it is much longer
filename. Even though NTFS can handle file names that long if you attempt
to save the path to a CD-R disk it will choke since the allowed path is much
shorter on CD-Rs using the normal Joilet format.

See
http://scilnet.fortlewis.edu/tech/NT-Server/file_names.htm#Long_Filenames
for alittle more than I took from the web site.


 
Ken,

Yep! Really didn't want to confuse T. Hunt any more than we already have.


Ken Blake said:
Actually with ME, 2000 & XP there can be as many characters after the . as
you want.


And you can have multiple dots, so filenames of the format
abcdefg.hij.klm.nop are valid.

--
Ken Blake
Please reply to the newsgroup

Interestingly enough, although NTFS can handle filenames of up to 255
characters, files created from the command line can only have filenames up
to 253 characters.

The special characters that cannot appear in an NTFS filename are as
follows:
? " / \ < > * | :

WARNING:
Using any 16-bit program such as the Windows 3.x File Manager or a DOS
utility such as Norton Commander to manipulate files that have long
filenames will destroy the long filenames! If this is on an NTFS volume, all
the security information will be eliminated as well! Only use 32-bit
programs that support long filenames to move or copy files on an NTFS
volume.

The filename does include the entire path so the file called fict.bat will
be at a minimum of 11 characters long (C:\fict/bat) or if it is C:\Documents
and Settings\LVTravel\My Documents\Documents\fict.bat it is much longer
filename. Even though NTFS can handle file names that long if you attempt
to save the path to a CD-R disk it will choke since the allowed path is much
shorter on CD-Rs using the normal Joilet format.

See
http://scilnet.fortlewis.edu/tech/NT-Server/file_names.htm#Long_Filenames
for alittle more than I took from the web site.
 
Bill said:
Depends on your file structure format. DOS using the
standard File Allocation Format Table (FAT)is limited to
what the old timers call the eight dot three or 8.3 when
using processors that were 16 bit. This means the
filename can't be longer that 8 characters long. Then
came the 32bit processors and with them the FAT32 file
format which allowed I believe filenames at least 32
characters long (might be wrong on the max number). The
large filenames carry to the NT File System (NTFS) in
WinNT, Win2000 and XP. The extensions, filename.xxx, are
still limited to 3.

Wrong in several respects.

Long file names are a Windows extension to the basic FAT method, which
uses extra directory entries to hold the long name.

It can be up to about 250 characters, including any extension after the
last period (and you can have more than one period in a long name). And
that extension can be more than 3 characters - eg .jpeg .tiff .mpeg or
..html, though more than four is not common it is allowed.

But there is a similar 250 or so character limit on the total
path\filename.extension, Also if you write CDs, the usual ISO Level 2
format imposes a 31 character limit, so it does not pay to go wild over
length
 
Back
Top