FaT3oYCG Posted October 29, 2008 Share Posted October 29, 2008 (edited) EDIT: sorry if found what i needed i beleive that i can use the FileFindFirstFile("filename") function as documented in the documentation, sorry if i have wasted your time. here is the code you can use to loop through files in the curerent working directory if anyone wants it $File_List = FileFindFirstFile("*.*") While 1 $Current_File = FileFindNextFile($File_List) If @error Then ExitLoop MsgBox(0, "FILE", $Current_File); Replace this to save the list to a file or add each item to a list box etc. WEnd FileClose($File_List) --------------------------------------------- Hi i am making a program that requires me to be able to get a list of all files in the current working directory. I know how to get the current working directory but i cant for the life of me find any information on how i would retreive a list of all files and folders inside that directory, then put it into an array, and then display it in a list box. I know how list boxes work but i need to get the file list to put in the list box. A treeview with a list of all folders and files on the drive selected would also be appropriate if not better. hope you can help Thanks FaT3oYCG Edited October 29, 2008 by FaT3oYCG Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right. Link to comment Share on other sites More sharing options...
99ojo Posted October 29, 2008 Share Posted October 29, 2008 Use Function _FileListToArray. This will list you files and folders into an array to work with. Regards Stefan Link to comment Share on other sites More sharing options...
FaT3oYCG Posted October 29, 2008 Author Share Posted October 29, 2008 cheers i used a different method but i think ill swap to this its much more handy. Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now