ok, im making a command shell, and im putting in a dir command, i need to display every file name in the directory supplied, no sub directoy file search, and search for folders too, and put "..." after its name, how would i go about doing that?
Posted on 2002-05-01 16:36:16 by Qages
Hi Qages

The api's FindFirstFile and FindNextFile should make it a simple task.

Posted on 2002-05-01 16:56:36 by KetilO
ok, but how do i uses these?
Posted on 2002-05-01 17:04:36 by Qages
I also made a command shell. Look here for source (file list part is marked red):
Posted on 2002-05-01 17:09:31 by bazik
If you considered using the search function that this site has you would find the answer in short order...

Please don't ask board members from doing all the work for you... Use the Win32.hlp file to find the correct calling :)


That's the example I was hoping he'd find...
Posted on 2002-05-01 17:12:37 by Sliver
don't flame at me for asking a simple question.
Posted on 2002-05-01 17:17:25 by Qages
Silver has some problems with guys wich ask a question ever and ever again. :tongue:
Instead of asking "ok, but how do i uses these?" you could just press the button and enter the two API names, KetilO told you.

No offence, Qages.

Posted on 2002-05-01 17:26:40 by bazik

Mabe about 2 weeks ago someone post about FindFirstFile and FindNextFile... The best i have seen. It is very very nice. And some good debates about it. But he won this one i think.

Look up the word enumfiles... or enumfiles.exe ... or call back

It was based ALL on CALL BACK

Searching is Wonderful here... no wait of time because most of it is all there....
Posted on 2002-05-02 00:21:05 by cmax
There is a much simpler method if you plan to use a listbox.
Windows has an API message called LB_DIR.
You can use it like this :

; create one listbox
; let's presume that hList is a handle to that listbox

all db "*.*",0


invoke SendMessage,hList1,LB_RESETCONTENT,0,0
invoke lstrcat,ADDR yourpath,ADDR all
invoke SendMessage,hList1,LB_DIR,DDL_ARCHIVE or DDL_DRIVES or \

; This will all everything in "yourpath" to that listbox
; Also you can play with the params
; Think ! That's why you've got a head.
Posted on 2002-05-02 16:39:25 by ViperV`