Windows unable to store a file with . period suffix

For everything that's not in any way related to PureBasic. General chat etc...
Oso
Enthusiast
Enthusiast
Posts: 595
Joined: Wed Jul 20, 2022 10:09 am

Windows unable to store a file with . period suffix

Post by Oso »

Something I saw on a Google group that interested me — Windows cannot store a filename ending with a period. It's thought to be a remnant from the old 8.3 filename limitation. Is this really the reason? I find it odd because filenames can contain periods within the first part of the name. Here is the test...

Code: Select all

ECHO xx > aa.            <------- Make sure to add the appended period
DIR                      Note how the period has been lost
TYPE aa                  There is your data!
I do a lot of work between Linux and Windows and transfer files between them using Samba. I just noticed that if I open the Samba share in Windows and copy a file with a period on the end (which is perfectly acceptable in Unix), Windows throws a tantrum and corrupts the filename to...

Code: Select all

MSMLDD~M
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: Windows unable to store a file with . period suffix

Post by Marc56us »

Oso wrote: Wed Nov 30, 2022 1:15 pm Something I saw on a Google group that interested me — Windows cannot store a filename ending with a period. It's thought to be a remnant from the old 8.3 filename limitation. Is this really the reason? I find it odd because filenames can contain periods within the first part of the name. Here is the test...

Code: Select all

ECHO xx > aa.            <------- Make sure to add the appended period
DIR                      Note how the period has been lost
TYPE aa                  There is your data!
I do a lot of work between Linux and Windows and transfer files between them using Samba. I just noticed that if I open the Samba share in Windows and copy a file with a period on the end (which is perfectly acceptable in Unix), Windows throws a tantrum and corrupts the filename to...

Code: Select all

MSMLDD~M
Edit smb.conf
Add in [global]

Code: Select all

mangled names = no 
Restart Samba (or wait 1 min)

Code: Select all

# killall smbd
# killall nmbd
# smbd -D
# nmbd -D

Code: Select all

C:\> dir /b z:\tmp
aa.
(Z: is a mapped drive to my Linux)

But that doesn't solve everything. Generally speaking, avoid files that end with a dot.

:wink:
Oso
Enthusiast
Enthusiast
Posts: 595
Joined: Wed Jul 20, 2022 10:09 am

Re: Windows unable to store a file with . period suffix

Post by Oso »

Marc56us wrote: Wed Nov 30, 2022 2:15 pm Edit smb.conf
Add in [global]

Code: Select all

mangled names = no 
Yes, mangled names = no shows the file in the share under a Windows client. Windows reluctantly displays it but will not open it....
Cannot option file "test" for read access. The system cannot find the file specified.
Post Reply