Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 12th, 2003, 09:37 PM
_CGIAddict _CGIAddict is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 13 _CGIAddict User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #2  
Old July 12th, 2003, 11:47 PM
_CGIAddict _CGIAddict is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 13 _CGIAddict User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have solved this issue myself

but thanks anyway in advance

Best regards

Reply With Quote
  #3  
Old July 13th, 2003, 01:51 PM
epl epl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Dublin
Posts: 413 epl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 18 sec
Reputation Power: 8
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)

Reply With Quote
  #4  
Old July 13th, 2003, 08:09 PM
_CGIAddict _CGIAddict is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 13 _CGIAddict User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Need help with msdos 8.3 standard name


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway