#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    17
    Rep Power
    0

    Need help with msdos 8.3 standard name


    Hi all!

    I am writing a gui which uses a shell command to run an
    old msdos app

    The problem is that the old msdos app doesn't support long filenames. So therefore I wrote a snippet to create a string as
    follows

    e.g

    the actual file(filename): 1234567890.zxc

    as you can see
    This is too long for standard 8.3 names( see Foot Note at the bottom of this input if you are not sure what 8.3 msdos standard is)

    so in msdos you get, for instance in win98

    123456~1.zxc

    So I have by hand created that string

    Then it was easy to apply to the command parameters for the old msdos application.

    So far so good

    Now to my problem.

    How do I get the Filelistbox in my gui(application) to show all files as 8.3 msdos format(meaning the format described above)?

    If you look at the beginning, I sad that I had wrote a small snippet of code to manufacture that format manually.

    However that doesn't stand a chance in the long run

    e.g

    two files:

    both with similar names, but using the exact letter the first six of them.

    real files: 123456787878787.zxc
    123456222222222.zxc

    These are just dummy formats and files just to give you guys the big picture.

    In those two cases the short msdos format(8.3) will be

    123456~1
    and
    123456~2

    but say that I have like twenty of those files, no fun at all

    You realize that I must completly know which file is which.
    I cannot just guess, since the msdos app konvert the files.

    So if I use 123456~1 (just the number 1 all the time)
    then I would simply get the wrong file.

    So is there a way to display all files in the filelistbox in msdos 8.3 format

    foot note: MS-Dos 8.3 format means 8 characters max then a period and then three following characters.
    12345678.123
    It all sums up to a grand total of twelve characters at most

    Any ideas?

    Best Regards
    Last edited by _CGIAddict; July 12th, 2003 at 09:39 PM.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    17
    Rep Power
    0
    I have solved this issue myself

    but thanks anyway in advance

    Best regards
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    Dublin
    Posts
    413
    Rep Power
    14
    how did you do it?

    i would have used either the scripting runtime library to get the short name or else the windows api function who's name I can't think of (search msdn for windows file api functions)
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    17
    Rep Power
    0
    Originally posted by epl
    how did you do it?

    i would have used either the scripting runtime library to get the short name or else the windows api function who's name I can't think of (search msdn for windows file api functions)

    Yes, scripting runtime library

    Shortname is way cool
    it handles how many long filenames as you want, I think
    So far the application runs smooth


    But I have another question?

    How do I determine if a filename firstly exist
    and if so, what case are the file in
    Upper or lower case, not the content, but the filename itself

    Since ucase() and lCase() Doesn't return anything
    I don't know how to make the application "know"
    which case those files are.

    Any idea?

    Best Regards

IMN logo majestic logo threadwatch logo seochat tools logo