?? Getting Directory Listing with qbasic 
Author Message
 ?? Getting Directory Listing with qbasic

Hello, does anyone have an example of a subroutine to get a recursive
directory listing and store it in text file?

I am currently writting a little utility for myself that checks the
length of filenames to make sure they are under 64 characters, so they
will work on ISO cd-r..  My current method is to run a
DIR *.* /B /S >dir.txt

 to get the recrusive listing of filenames and paths into filename
dir.txt, then run the qbasic proggie I have reads it and does it
magic..

what I want is for the program to ask for a directory, then dump its
recursive lsiting into dir.txt (with path and stuff)  or maybe even
run  DIR *.* /B /S >dir.txt  from within qbasic..

using v1.1

thanx
Danny Shaffer

Chef Groovy
ICQ: 1529949
---------
"I'd rather have smoke and no money
Than money and no smoke"
- Freak Brothers



Sat, 22 Sep 2001 03:00:00 GMT  
 ?? Getting Directory Listing with qbasic

Quote:
> what I want is for the program to ask for a directory, then dump its
> recursive lsiting into dir.txt (with path and stuff)  or maybe even
> run  DIR *.* /B /S >dir.txt  from within qbasic..

LINE INPUT "Enter a directory name (or wildcard): ", d$
SHELL "DIR " + d$ +" /B /S > dir.txt"

Tom Lake
ICQ #25589135



Sat, 22 Sep 2001 03:00:00 GMT  
 ?? Getting Directory Listing with qbasic

thanx!!

know of a way to read the diorectory from WITHIN qbasic.. mabe read
one filename at a time, and store it in a variable?

might be too complicated, and the SHELL method you told me about might
be easier,

Danny



Quote:
>> what I want is for the program to ask for a directory, then dump its
>> recursive lsiting into dir.txt (with path and stuff)  or maybe even
>> run  DIR *.* /B /S >dir.txt  from within qbasic..

>LINE INPUT "Enter a directory name (or wildcard): ", d$
>SHELL "DIR " + d$ +" /B /S > dir.txt"

>Tom Lake
>ICQ #25589135

Chef Groovy
ICQ: 1529949
---------
"I'd rather have smoke and no money
Than money and no smoke"
- Freak Brothers


Mon, 24 Sep 2001 03:00:00 GMT  
 ?? Getting Directory Listing with qbasic

writes:

Quote:
>thanx!!

>know of a way to read the diorectory from WITHIN qbasic.. mabe read
>one filename at a time, and store it in a variable?

>might be too complicated, and the SHELL method you told me about might
>be easier,

>Danny

Check the ABC packets - there are methods there for QBasic and QB to
call DOS functions which will help you do what you want.

Mike A.



Wed, 26 Sep 2001 03:00:00 GMT  
 ?? Getting Directory Listing with qbasic

: >thanx!!
: >
: >know of a way to read the diorectory from WITHIN qbasic.. mabe read
: >one filename at a time, and store it in a variable?
: >
: >might be too complicated, and the SHELL method you told me about might
: >be easier,
: >
: >Danny

: Check the ABC packets - there are methods there for QBasic and QB to
: call DOS functions which will help you do what you want.

Yes, there is plenty to choose from at http://www.basicguru.com/abc/
Go to our DOS section.  For QB -> QBasic, you can use an interrupt
emulator.

Q: What's the best?
A: This is a tricky question, I'll enumerate the ones that works for
   me.  Even if you see one that you like for QB, it can be ported
   to QBasic by using an Interrupt emulator (check DOS.ABC)
   Porting to PB is pretty simple as well, but PB has their own DIR
   routine, so you decide if it's worth it.

   For QBasic:
     DIR FUNCTION FOR QBASIC by Mike Anderson
        * This is actually a port to QBasic of Dave Cleary's DIR.BAS
        + Very easy to use and incorporate
        - Doesn't do much in terms of giving you file information
     GET DIRECTORY SCAN by Mark K. Kim
        + Returns extensive file information (if needed)
        + Pretty easy to use
        - Not so easy to understand

   For QB:
     PDS DIR$ FUNCTION FOR QB by Dave Cleary
        * The definitive and most popular DIR routine
        + Very simple to use and understand
        - Again, doesn't return extended file information
     DIRECTORY LISTER by Alvin Williams
        * A full featured directory lister with multiple columns!
        + If you don't want to do everything yourself, try this
        - Complex, not for use if you want a flexible lister
     FILE/DIRECTORY ROUTINES by Hans Lunsing
        + Very powerful, returns extended file information
        - Doesn't include a sample run, so if you're not familiar...
     REAL DIRECTORY by Rich Geldreich
        * Another full featured directory list
        + Looks a lot like QB's Open directory lister
        - Being full featured, if you want flexibility, look elsewhere
     SCROLLING DIRECTORY LIST by Kurt Kuzba
        + Small and simple, even returns extended file information
        + Sample run includes a directory lister
        - Not very well documented, or at all... can be confusing.

   All the above mentioned directory handling routines can be found in
   DOS.ABC, as for the exact issue... I don't know.

--
William Yu



Wed, 26 Sep 2001 03:00:00 GMT  
 ?? Getting Directory Listing with qbasic

thank you !!   I will tinker with it...  I also need the LONG filename
too, instead of the dos 8.3 one.. might get complicated.. hehe

danny


Quote:

>: >thanx!!
>: >
>: >know of a way to read the diorectory from WITHIN qbasic.. mabe read
>: >one filename at a time, and store it in a variable?
>: >
>: >might be too complicated, and the SHELL method you told me about might
>: >be easier,
>: >
>: >Danny

>: Check the ABC packets - there are methods there for QBasic and QB to
>: call DOS functions which will help you do what you want.

>Yes, there is plenty to choose from at http://www.basicguru.com/abc/
>Go to our DOS section.  For QB -> QBasic, you can use an interrupt
>emulator.

>Q: What's the best?
>A: This is a tricky question, I'll enumerate the ones that works for
>   me.  Even if you see one that you like for QB, it can be ported
>   to QBasic by using an Interrupt emulator (check DOS.ABC)
>   Porting to PB is pretty simple as well, but PB has their own DIR
>   routine, so you decide if it's worth it.

>   For QBasic:
>     DIR FUNCTION FOR QBASIC by Mike Anderson
>        * This is actually a port to QBasic of Dave Cleary's DIR.BAS
>        + Very easy to use and incorporate
>        - Doesn't do much in terms of giving you file information
>     GET DIRECTORY SCAN by Mark K. Kim
>        + Returns extensive file information (if needed)
>        + Pretty easy to use
>        - Not so easy to understand

>   For QB:
>     PDS DIR$ FUNCTION FOR QB by Dave Cleary
>        * The definitive and most popular DIR routine
>        + Very simple to use and understand
>        - Again, doesn't return extended file information
>     DIRECTORY LISTER by Alvin Williams
>        * A full featured directory lister with multiple columns!
>        + If you don't want to do everything yourself, try this
>        - Complex, not for use if you want a flexible lister
>     FILE/DIRECTORY ROUTINES by Hans Lunsing
>        + Very powerful, returns extended file information
>        - Doesn't include a sample run, so if you're not familiar...
>     REAL DIRECTORY by Rich Geldreich
>        * Another full featured directory list
>        + Looks a lot like QB's Open directory lister
>        - Being full featured, if you want flexibility, look elsewhere
>     SCROLLING DIRECTORY LIST by Kurt Kuzba
>        + Small and simple, even returns extended file information
>        + Sample run includes a directory lister
>        - Not very well documented, or at all... can be confusing.

>   All the above mentioned directory handling routines can be found in
>   DOS.ABC, as for the exact issue... I don't know.

Chef Groovy
ICQ: 1529949
---------
"I'd rather have smoke and no money
Than money and no smoke"
- Freak Brothers


Sat, 29 Sep 2001 03:00:00 GMT  
 ?? Getting Directory Listing with qbasic


Quote:

>thank you !!   I will tinker with it...  I also need the LONG filename
>too, instead of the dos 8.3 one.. might get complicated.. hehe

>danny

There are some routines that will give you LFN's too. Can't remember
the address, try searching at

http//neozones.quickbasic.com



Sun, 30 Sep 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. getting list of directories into list box

2. Getting list of files in a directory

3. Getting a list of files in a directory

4. Getting directory list of a folder's contents

5. Getting a http directory list.

6. getting list of files in a directory

7. Getting Directory List

8. Getting Recursive Directory List...

9. Getting a detailed directory listing using Internet transfer control, file sizes

10. Problem getting directory listing

11. Getting a directory listing

12. getting a qbasic program to run the command to start another non qbasic

 

 
Powered by phpBB® Forum Software