| View previous topic :: View next topic |
| Author |
Message |
attreus Valued Newbie

Joined: 30 Jul 2002 Posts: 46 Location: Berlin/Germany
|
Posted: Mon Dec 20, 2004 6:19 pm Post subject: @shortname under winxp - a bug? |
|
|
hello,
a view days ago i changed my os from win2k to winxp pro sp1. now i noticed, that all my vds-programms wich use the "run"-command in association with the "@shortname"-function don't work anymore.
a couple of them i could solve the problem by using "@chr(34)" but in some cases this also doesn't work.
when i testet, i found a strange behaviour of the "@shortname"-function under winxp.
i have no idea is it a bug in vds or in winxp.
here is a little test, on drive "C:" it works fine, on drive "E:" not. if i
give another name to the folder in drive E: it works.
but please don't say: "just rename the folder" - it has to work with any path.
| Code: |
%%long = C:\Eigene Dateien\test text.txt
%%short = @shortname(%%long)
info Long = %%long@cr()Short = %%short
%%long = E:\Eigene Dateien\test text.txt
%%short = @shortname(%%long)
info Long = %%long@cr()Short = %%short
exit
|
thanks for your help |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Dec 20, 2004 7:03 pm Post subject: |
|
|
There is a difference with Windows XP. Possibly only when you use the file system NTFS. XP doesn't use short names so it sort of simulates them. I think that the API calls only return the short name of the last folder in the path. I seem to recall once writing a function that split up a path into its components and got the short name of each, to get round it, but I can't remember much more about it. I've never had any problems with things running under XP because of this, though. I did it mainly to get round the problem of passing very long paths to 16-bit utilities that are restricted to 128 character command lines. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
attreus Valued Newbie

Joined: 30 Jul 2002 Posts: 46 Location: Berlin/Germany
|
Posted: Mon Dec 20, 2004 11:21 pm Post subject: |
|
|
thanks jules,
paradoxically it returns the correct short path if i change it to eg. "my files" instead of "eigene dateien" and on drive C: even "eigene dateien" works fine. the ntfs-filesystem i did use before under w2k too and i had no problems with it.
greetings |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Dec 21, 2004 9:50 am Post subject: |
|
|
Curious. All I can do is confirm that it is Windows that is doing it. @shortname is just a wrapper around a Windows API function, and VDS calls the same function no matter what version of Windows it's running on. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
|