Sign in to follow this  
Followers 0
ccdust

Files in dir

7 posts in this topic




actual useage

#Include <File.au3>
#Include <Array.au3>
$FileList=_FileListToArray(@HomeDrive, "*.MAP", 1)
If (Not IsArray($FileList)) Or (@Error=1) Then
    MsgBox (0,"","No Files\Folders Found.")
    Exit
EndIf
_ArrayDisplay($FileList,"$FileList")

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Check out the _FileListToArray() UDF that comes with the Beta installer....

i notice in help it states

If (Not IsArray($FileList)) and (@Error=1) Then

but the repacement of "and" with "or" seemed to be correct way...

as in my post above

???

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

i notice in help it states

If (Not IsArray($FileList)) and (@Error=1) Then

but the repacement of "and" with "or" seemed to be correct way...

as in my post above

???

8)

The IF is correct because it only filters out the case of "No files found" .....

Maybe the UDF needs to be updated in case no file is found to generate Error(1)...

:P

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Thanks for help here is my solution

#Include <File.au3>
#Include <Array.au3>
$vsebinamape = _FileListToArray (".", "*.MAP")
Dim $listamap = _ArrayToString($vsebinamape, "|", 1)
$mapaS = GUICtrlCreateCombo("", 15, 20, 180)
GUICtrlSetData(-1, $listamap)
GUICtrlCreateLabel("Num. of maps: " & $vsebinamape[0], 120, 55)

I've needed this for duke3d launcher!

Edited by ccdust

Ponosen prebivalec Slovenije!My blog http://blog.babnopolje.net/

Share this post


Link to post
Share on other sites

Thanks for help here is my solution

#Include <File.au3>
#Include <Array.au3>
$vsebinamape = _FileListToArray (".", "*.MAP")
Dim $listamap = _ArrayToString($vsebinamape, "|", 1)
$mapaS = GUICtrlCreateCombo("", 15, 20, 180)
GUICtrlSetData(-1, $listamap)
GUICtrlCreateLabel("Num. of maps: " & $vsebinamape[0], 120, 55)

I've needed this for duke3d launcher!

First... Welcome to the forums

Second

Very good coding... for a 3rd post

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0