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?
Hi Qages
The api's FindFirstFile and FindNextFile should make it a simple task.
KetilO
The api's FindFirstFile and FindNextFile should make it a simple task.
KetilO
ok, but how do i uses these?
I also made a command shell. Look here for source (file list part is marked red):
http://www.asmcommunity.net/board/index.php?topic=2916&highlight=winshell
http://www.asmcommunity.net/board/index.php?topic=2916&highlight=winshell
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 :)
Sliver
--EDIT--
That's the example I was hoping he'd find...
Please don't ask board members from doing all the work for you... Use the Win32.hlp file to find the correct calling :)
Sliver
--EDIT--
That's the example I was hoping he'd find...
don't flame at me for asking a simple question.
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.
regards,
bAZiK
Instead of asking "ok, but how do i uses these?" you could just press the

No offence, Qages.
regards,
bAZiK
enumfiles.exe
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....
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....
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
.data
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 \
DDL_DIRECTORY or DDL_HIDDEN or DDL_READONLY or \
DDL_READWRITE or DDL_SYSTEM,ADDR yourpath
; 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.
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
.data
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 \
DDL_DIRECTORY or DDL_HIDDEN or DDL_READONLY or \
DDL_READWRITE or DDL_SYSTEM,ADDR yourpath
; 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.