Getting a list of files/folders in QB4.5

How?!?! I looked over the entire help file and I can't find any way to get a list of files/folders. I've found lots of things to do on already open files, but that doesn't help much. I don't want to use the "Files" command unless there is some way to "redirect" it to a different "screen" so that it doesn't show up. I can shell the dir command into a file, but isn't there a better way?



Thanks!


Comments

  • You can do like this... it works !



    shell "dir "+ path$ + " /B >c:index"



    ">c:index" will put the files and the dirs in

    a file named c:index.



    "/B" will take away size and time information.



    Open the file in QB4.5 and...

    Now you only sort them out.

    The names who are not containing a "." (dot) are

    a file name and the others are dirs.



    Easy peasy.




  • : You can do like this... it works !



    Thanks, but...

    Glance back at my original post and you'll see that I knew about that already (very last line: "I can shell the dir command into a file..."). I was just hoping that there was a method that didn't involve file I/O or Shell.



    Thanks anyway!


  • I have what you need (DIR$ function)Email me and I will send it to you or you can go to my web page and download the file exe2bin.zip it has the DIR$ function included with it.



    my email is [email protected]

    URL http://homepage.netspaceonline.com/~pitman/







    : How?!?! I looked over the entire help file and I can't find any way to get a list of files/folders. I've found lots of things to do on already open files, but that doesn't help much. I don't want to use the "Files" command unless there is some way to "redirect" it to a different "screen" so that it doesn't show up. I can shell the dir command into a file, but isn't there a better way?

    :

    : Thanks!

    :






    URL:http://homepage.netspaceonline.com/~pitman/

  • : I have what you need (DIR$ function)Email me and I will send it to you or you can go to my web page and download the file exe2bin.zip it has the DIR$ function included with it.

    :

    : my email is [email protected]

    : URL http://homepage.netspaceonline.com/~pitman/

    :

    :



    Many thanks!

    I haven't tried it yet, but if it works (which I assume it does ;-)), it'll be a small blessing!



    Later,

    KDivad


  • hehe, i made a comlete sub to remove the time and such, and now after all those months you said the /B switch...



    oh god!



    Thanx!

    -Stefan






  • ther is no good example of using it in the file exe2bin.bas so here is how



    to list all files in a directory...



    'call dir$ once with the filespec like so



    FileList$ = DIR$("*.*",&HFF,0)



    if FileList$ ="" then print "no files found"



    'then call it with a nul string like so



    do

    FileList$ = DIR$("",&HFF,0)

    print FileList$

    loop until FileList$ = ""







    : I have what you need (DIR$ function)Email me and I will send it to you or you can go to my web page and download the file exe2bin.zip it has the DIR$ function included with it.

    :

    : my email is [email protected]

    : URL http://homepage.netspaceonline.com/~pitman/

    :

    :

    :

    : : How?!?! I looked over the entire help file and I can't find any way to get a list of files/folders. I've found lots of things to do on already open files, but that doesn't help much. I don't want to use the "Files" command unless there is some way to "redirect" it to a different "screen" so that it doesn't show up. I can shell the dir command into a file, but isn't there a better way?

    : :

    : : Thanks!

    : :

    :

    :

    :






  • : ther is no good example of using it in the file exe2bin.bas so here is how

    :



    I had already guessed that since it is how VB does its same command, but I appreciate you telling me!


  • : Thanks, but...

    : Glance back at my original post and you'll see that I knew about that already (very last line: "I can shell the dir command into a file..."). I was just hoping that there was a method that didn't involve file I/O or Shell.

    :

    : Thanks anyway!

    :

    Hi,

    You can do it by interrupt calls (ms-dos 21H)

    And defining a buffer. I saw it in "PC SYSTEM PROGRAMMING (PC INTERN)" BOOK. If You can't find it, send me an email.




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories