PDA

Click to See Complete Forum and Search --> : How do i get the short name (8.3) of dir ??? (Help!)


TalZ
Jun 15th, 2000, 12:55 AM
Please HELP!
i work with Win2k and VB6 (Enterprise)...
i know about the API function GetShortPathName, but when i try to use it i get an ****ing error message.
i try it all!

there is another way to get it?
i try from dos... but nothing.

please tell me if you know how to do it.
program that write it to file, i dont know...

HELP!

TalZ
Jun 15th, 2000, 01:49 AM
thanks all!

i find the answer.
the problem was in the buffer size...

if you have the same problem...

http://www.vb-world.net/tips/tip36.html

:p :p :p :p :p :p :p :p :p

DiGiTaIErRoR
Jun 15th, 2000, 02:41 AM
That seems long... why not just do this:

If len(path) > 8 then path = left$(path, 6) & "~1"

Seems easier to me?

TalZ
Jun 16th, 2000, 03:54 AM
yes but if you have space in dir name like
"My Documents"

with your code it will be
"My Doc~1"

and it
"MyDocu~1"

but you can do

for i=1 to 7
if mid(path,i,1) = " " then ...
next

but it much more "safer" to use API command... (it's take it from the real place...)