mIRC Homepage
Posted By: Mc_Fly shortfn and NTFS system file - 28/11/04 06:51 PM
mIRC can't return the short filename of a file in NTFS system file: $shortfn and $findfile().shortfn return long filename, ...

How get a shortfn for this sytem file ?
Posted By: starbucks_mafia Re: shortfn and NTFS system file - 28/11/04 07:47 PM
An NTFS volume can have short filenames disabled, presumably this is the cause of your problem.
Posted By: qwerty Re: shortfn and NTFS system file - 28/11/04 07:50 PM
$shortfn and $findfile().shortfn have always worked fine for me on NTFS. You should check if you have disabled short file name creation on your NTFS partition (certain tweaking utilities can do that). To do that, open the Registry Editor ( /run regedit ), go to HKLM\System\CurrentControlSet\Control\FileSystem key and check if there is a DWORD entry named NtfsDisable8dot3NameCreation with a value of 1. If there is, change it to 0 and reboot your system. Be aware that messing with the registry or system settings can cause problems, so make sure that you don't make mistakes doing the above and that you don't touch other things that you may find in there.
Posted By: Mc_Fly Re: shortfn and NTFS system file - 28/11/04 08:03 PM
thanks
Posted By: Mc_Fly Re: shortfn and NTFS system file - 28/11/04 08:29 PM
I'm sorry, i've changed the value (it was set to 1, i change to 0), i restart xp, and mIRC i check if $shortfn work on NTFS volume but not, i check if registry value is 0, it is...
What is my problem ? (i have just changed this value today)
Post deleted by Danthemandoo
Posted By: tidy_trax Re: shortfn and NTFS system file - 28/11/04 08:48 PM
That would be $nopath.
Posted By: qwerty Re: shortfn and NTFS system file - 28/11/04 09:19 PM
Apparently Windows doesn't automatically recreate the short file names for the existing files; it will do it for every new file you create. It also seems there is no easy way to force Windows to rebuild the short file names, you probably have to move all files to a temp folder. Try with a temp folder on the same drive, so the process doesn't take long; if it doesn't work, try moving them to a temp folder that's on a different drive. Then move them back to their original location.

Oh and find whoever/whatever had changed the setting to 1 and don't let them do that again :tongue:
Posted By: Mc_Fly Re: shortfn and NTFS system file - 28/11/04 10:02 PM
I move dir in other dir, but when i do: $findfile(dir,*,0,echo $1-).shortfn
I see long filename (i put $1-, because $1 don't ruturn all the filename)

I remark some file have short filename, maybe because they are created on FAT32 volume and moved after, all new file haven't shortfn. Files recently (before change registry) but created on fat32 renamed haven't shortfn...
Posted By: DaveC Re: shortfn and NTFS system file - 28/11/04 11:22 PM
try using the dos copy or xcopy command to create the set of files on the fat32 drive from the originals on the NTFS, it might have to do with u using a highlevel file manager such as explorer to copy/move them. (i dont really know tho). I was sure (now im not so sure) that fat32 drives always had to have a shortfilename for each lfn.
Posted By: starbucks_mafia Re: shortfn and NTFS system file - 28/11/04 11:30 PM
FAT requires short filenames, however the problem with moving them all over to a FAT system and back again is that the files will lose all NTFS-unique attributes such as file permissions and compression/encryption. I would imagine that simply copying the files within the NTFS volume, deleting the originals, then moving the copies back into the original place would be enough to create short filenames.
Posted By: burek Re: shortfn and NTFS system file - 29/11/04 01:37 PM
try looking for help on fsutil, particularly
[b]fsutil file [setshortname] PathName shortname[b]
Posted By: tontito Re: shortfn and NTFS system file - 29/11/04 07:38 PM
Hello, i had a friend that had exactly the same problem.
Did you convert the hd file system from fat32 to NTFS?
Maybe that was the reason why you had the registry value changed...
Posted By: DaveC Re: shortfn and NTFS system file - 29/11/04 08:49 PM
I didnt think any of the lost data with transfering to fat made a difference to him since hes already been trying that, i was rather refering to the method hes been using to transfer the files. But your point is well worth listening to as a general subject item, to often i focus just on the problem at hand and dont look at the surrounding ramifications of what im doing, "fix this now deal with the fall out of it later" smile
© mIRC Discussion Forums