Hello all,
not sure what to call this. So here goes.
I need to read a directory and fill a menu type list with the file names.
then the user selects a filename to load.
I was thinking of using the menu code from my thread here.
http://qbasic-forum.qbcafe.net/viewtopic.php?t=587
so what i would need is how to load the array of the menu items, but the number of files is not fixed.
what I am working on,it is a invoicing program for a auto body shop. program overview.. the user creates a invoice file(new client) of the costumer (files will be named by costumer name). then each day as he works on the costumer car, he edits the invoice with parts and labor time.
at the start of the day the user selects "load invoice", a menu loads with the file names, and the user selects one to edit for the day.
thanks
reading a file list
Moderators:Administrator, Global Moderator
I don't want to achieve immortality through my work. I want to achieve it through not dying.
There is a library with good documentation called ADVBAS which you can download from here.
http://pages.sbcglobal.net/oasys/dnldfr.htm
It contains a routine 'Findfirsf' which if you supply a drive letter and suitable wildcards will find the first file in that range on the disk.
Subsequent files can be found with 'Findnextf'. ADVBAS has several other useful routines - one I use a lot is 'If exist' to see if the file you want exists on the drive.
http://pages.sbcglobal.net/oasys/dnldfr.htm
It contains a routine 'Findfirsf' which if you supply a drive letter and suitable wildcards will find the first file in that range on the disk.
Subsequent files can be found with 'Findnextf'. ADVBAS has several other useful routines - one I use a lot is 'If exist' to see if the file you want exists on the drive.