Preservation of short and long filenames in Windows 9x/et all with Samba

Preservation of short and long filenames in Windows 9x/et all with Samba

Post by Blondegu » Tue, 10 Jun 2003 02:09:32



I have combed the Internet for an answer to this question and I have
not found it.

Here's the problem.

As some may know, trying to copy files with xcopy32/explorer on a
Windows machine to another drive or other Windows machine DOES NOT
imply that both long and short filenames will be copied exactly.
eg.
long filename : thisisalongfilename.txt (in Windows)
short filename: THISIS~1.TXT (at the DOS command prompt)

From what I have seen, if a file is copied in Windows from one drive
to another the nomenclature of both long and short filenames is
preserved as long as complete directories are copied at once. The same
is true if done over a network. I think the reason why this works is
because the files are copied EXACTLY in the order they were created.
Thus if we have the case of two filenames where:

long filename : thisisalongfilename1.txt (in Windows)
short filename: THISIS~1.TXT (at the DOS command prompt)

long filename : thisisalongfilename2.txt (in Windows)
short filename: THISIS~2.TXT (at the DOS command prompt)

if the combination of thisisalongfilename1.txt/THISIS~1.TXT is copied
first it will have exactly the same name on the destination drive.
Likewise if the combination thisisalongfilename2.txt/THISIS~2.TXT is
copied first the filenames on the destination will be WRONG! ie
thisisalongfilename2.txt/THISIS~1.TXT. Note that the difference,
THISIS~1.TXT should be THISIS~2.TXT. You can try this on a Windows
machine to see how this works as indicated here.

In my experience the combination will be copied EXACTLY as long as
complete directories are copied.

The question is how does SAMBA insure that the both long and short
filenames are preserved exactly? This is not a frivolous question as I
do not know whether/how SAMBA copies/stores both long and short
filenames. Likewise any backup of a Windows directory on a Windows
machine, if the files are not copied/restored in EXACTLY the same
order they were created will be corrupt. (Trust me I have done this
hundreds of times!) If you don't believe me look at the Windows
registry to find all the short filenames embedded within!! I think
that if a Windows machine sends files to the SAMBA machine the
nomenclature should be preserved? But what is unclear is that since
SAMBA is running a completely different operating system whether a
directory request made from the Linux machine would be such that that
it would mimic exactly the DOS/Windows request? The reason for this
concern is for backing up entire Windows systems on a Linux machine.

Thanks.

 
 
 

1. converting long filenames to short

After attempting to convert a variable (with a local path as its value)
to a short filename, the filename is still in non 8.3 format.  The
path, however, is in the short format.

Anyone have any ideas?

Thanks,

Guy

Sent via Deja.com http://www.deja.com/
Before you buy.

2. suggestions on 2+ TB of disk?

3. Samba, Long filenames, Windows 95, LANMAN2 on server

4. Pthreads?

5. Does SAMBA support long filenames

6. CFP: SAFECOMP 2003

7. Win95 long filenames not accepted by SAMBA under linux

8. WANTED FOR ROMANIA MODEMS

9. Support in WFW3.11 to read true long filenames with Samba 1.9.13

10. Samba, WIN95 and long filenames?

11. DOS and Samba and long filenames

12. Problems associated with long filenames held on Samba fileserver?