mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2004
Posts: 33
M
Mc_Fly Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2004
Posts: 33
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 ?

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
An NTFS volume can have short filenames disabled, presumably this is the cause of your problem.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
$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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Mar 2004
Posts: 33
M
Mc_Fly Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2004
Posts: 33
thanks

Joined: Mar 2004
Posts: 33
M
Mc_Fly Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2004
Posts: 33
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)

Joined: Mar 2004
Posts: 457
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
Post deleted by Danthemandoo

Last edited by Danthemandoo; 28/11/04 08:48 PM.
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
That would be $nopath.


New username: hixxy
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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:


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Mar 2004
Posts: 33
M
Mc_Fly Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2004
Posts: 33
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...

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Oct 2004
Posts: 32
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2004
Posts: 32
try looking for help on fsutil, particularly
[b]fsutil file [setshortname] PathName shortname[b]

Joined: Feb 2003
Posts: 307
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
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...

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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


Link Copied to Clipboard