mIRC Home    About    Download    Register    News    Help

Print Thread
[7.32] $shortfn doesn't work on Windows 8.1 #245135 11/04/14 06:29 PM
Joined: Dec 2002
Posts: 122
S
STING Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 122
Hello,

I've just noticed that $shortfn() doesn't work with me on Windows 8.1 (64-Bit). On Windows 7 it still works.

//echo -a $shortfn($mircexe)

Re: [7.32] $shortfn doesn't work on Windows 8.1 [Re: STING] #245137 11/04/14 07:00 PM
Joined: Dec 2002
Posts: 5,002
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,002
The most common reason for this is that short filename creation may be disabled in Windows. You can find out more here. If it is disabled, or if is enabled but for some reason the file does not have a short filename set, Windows will return the long filename instead.

Re: [7.32] $shortfn doesn't work on Windows 8.1 [Re: Khaled] #245138 11/04/14 07:11 PM
Joined: Dec 2002
Posts: 122
S
STING Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 122
Thank you for the rapid response.

Code:
C:\WINDOWS\system32>fsutil 8dot3name query d:
The volume state is: 1 (8dot3 name creation is disabled).
The registry state is: 2 (Per volume setting - the default).

Based on the above two settings, 8dot3 name creation is disabled on d:


I guess using $shortfn() these days is really not a 'best practice' anymore and we should probably instead encapsulate paths with quotes. Right?

Last edited by STING; 11/04/14 07:12 PM.
Re: [7.32] $shortfn doesn't work on Windows 8.1 [Re: STING] #245139 11/04/14 07:21 PM
Joined: Jul 2006
Posts: 3,811
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,811
Not right, using $qt can fail if the path has consecutive spaces, while $shortfn works.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: [7.32] $shortfn doesn't work on Windows 8.1 [Re: Wims] #245140 11/04/14 07:28 PM
Joined: Dec 2002
Posts: 122
S
STING Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 122
Ah, that's probably why I got rid of the quotes way back and switched to $shortfn() wink

So.. what then is the solution for file handling in a path with consecutive spaces wink

Re: [7.32] $shortfn doesn't work on Windows 8.1 [Re: STING] #245143 11/04/14 08:02 PM
Joined: Jul 2006
Posts: 3,811
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,811
Only solution is $shortfn but it's so rare to have consecutives space in a filename that nobody ever complained, meaning nobody ever bothered using $shortfn anyway, $qt is much more used.
There is currently no general solution to handle leading/consecutives/trailing spaces with /commands.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net