forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


@shortname under winxp - a bug?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
attreus
Valued Newbie


Joined: 30 Jul 2002
Posts: 46
Location: Berlin/Germany

PostPosted: Mon Dec 20, 2004 6:19 pm    Post subject: @shortname under winxp - a bug? Reply with quote

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
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Mon Dec 20, 2004 7:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
attreus
Valued Newbie


Joined: 30 Jul 2002
Posts: 46
Location: Berlin/Germany

PostPosted: Mon Dec 20, 2004 11:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Dec 21, 2004 9:50 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group