Results 1 to 4 of 4

Thread: How do i get the short name (8.3) of dir ??? (Help!)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    16

    Angry

    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!
    Tal Zur!

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    16

    Thanks!

    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



    Tal Zur!

  3. #3
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    That seems long... why not just do this:
    Code:
    If len(path) > 8 then path = left$(path, 6) & "~1"
    Seems easier to me?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    16

    Exclamation Yes But...

    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...)
    Tal Zur!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width