I am trying to copy the file from one unix location to this location using "cp" command.
After I copy the copy and check the filename logging through unix, I can see it as expected. But, when I check the file from Windows at the n/w share, the filename is corrupted with some strange alphabets followed by "~".e.g.: FRPOU00~.txt or RCRTU45~.txt. The data in the file is all consistent, just the filename is the issue...
It should be something like file1.txt or file2.txt. I can see the correct names for those files when connected through unix.
One thing to note here is the file size is about 1GB.
I think those are short 8.3 DOS names and the Unix names somehow do not get translated into the longer Windows names.....
What software and methods are you using on either platform to facilitate the sharing?
Sorry..but can you be more specific about what you mean software/methods being used?
I am just using a "cp src_dir/file.txt tgt_dir/file.txt" command....
Point to be noted here is, I have 4 files out of which 2 files are small files(arnd 400MB) which are copied with no issues.. Only the big 2 files(arnd 1GB) are having the issue...
Also, the smaller files have longer filenames compared to big files and still those are copied successfully...
Are the Unix installation and the Windows installation on the same machine? If not, how are files shared between them (FTP, WebDAV, SFTP, SMB/CIFS, NFS, ...)?
I seem to recall some kind of compatibility setting. Windows 3.1 used filenames 12345678.123 format. Thus, a long filename such as 1234567890.123 would become 1234567~.123
However, your second comment about "size" of the file also has me intrigued. Coincidence? Can you tell us
original-filename original-filesize final-filename
So we can rule some things in/out of the mix.
Point to be noted here is the other file which is smaller in size(419MB) has a longer filename(Transction_summary_file1.txt) and is still copied correctly.
Also, for the file having issue, I can see the correct final filename when I login through Unix but shows this distorted name when I go through windows.
The ~ version of filenames when displayed in MSDOS 8.3 notation is to handle filenames which might not be unique when truncated. This gets progressively more complicated the more similar filenames you have:
To see both versions at a CMD prompt use "dir /X":