|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Hello, I had just move my mirc into an other drive and i had some errors with my scripts so i debug it and saw that $shortfn does not working into other drives except C:\ i don't know if everything else is working but this does not. Using Windows 10 Pro 10041 64bit Examples On C:\ -> //echo -a $shortfn($mircexe) Results: C:\MIRC-T~1\mirc.exe On G:\ -> //echo -a $shortfn($mircexe) Results: G:\MIRC-TEST\mirc.exe Here is one small image: http://i.imgur.com/hlXdjBL.png- Thanks!
Last edited by westor; 22/03/15 04:33 PM.
|
|
|
|
Joined: Jul 2006
Posts: 4,150
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,150 |
This isn't a bug I think, I'm not sure but the filename G:\MIRC-TEST\mirc.exe doesn't have to be shortened. Regardless, this path doesn't have space, how is it breaking your script exactly?
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
MSDN > GetShortPathName
"If you call GetShortPathName on a path that doesn't have any short names on-disk, the call will succeed, but will return the long-name path instead. [On NTFS volumes] there's no guarantee that a short name will exist for a given long name."https://msdn.microsoft.com/en-us/library/windows/desktop/aa364989%28v=vs.85%29.aspx MSDN > Short vs. Long Names
"A long file name is considered to be any file name that exceeds the short MS-DOS (also called 8.3) style naming convention. Typically, Windows stores long file names on disk as special directory entries, which can be disabled systemwide for performance reasons depending on the particular file system. When you create a long file name, Windows may also create a short 8.3 form of the name, called the 8.3 alias, and store it on disk also. This 8.3 aliasing can be disabled for a specified volume."
"Note: Not all file systems follow the tilde substitution convention, and systems can be configured to disable 8.3 alias generation even if they normally support it. Therefore, do not make the assumption that the 8.3 alias already exists on-disk."https://msdn.microsoft.com/en-us/library..._vs._long_names (P.S. Wims: MIRC-TEST is a long name that qualifies to be shortened. MIRCTEST would not.)
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
You should consider discontinuing use of $shortfn() in all of your mIRC scripts, unless you are still maintaining a Windows 95 operating system. This doesn't seem to be the case, since you're on Windows 10.
Tell us why you need to use $shortfn() and we'll help you find alternate solutions.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
You should consider discontinuing use of $shortfn() in all of your mIRC scripts, unless you are still maintaining a Windows 95 operating system. This doesn't seem to be the case, since you're on Windows 10.
Tell us why you need to use $shortfn() and we'll help you find alternate solutions. I already find a way to not use $shortfn identifier but i could not understand why it was working on C:\ and not on G:\ drive but i read a bit your post and help me to understand now that is not an mIRC issue, thanks for definition..
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
You can configure your G: volume to support 8.3 file names. This article explains how to disable and enable 8.3 name creation at the volume and system level. I do not believe the short name aliases are automatically created upon using this command, and may require a file copy or move as the aliases are only assigned on file creation. https://support.microsoft.com/en-us/kb/121007
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
|
|