Zomp Posted March 30, 2008 Share Posted March 30, 2008 (edited) I'm a very newbie of AutoIt. Trying to build a simple script, I encountered the problem of obtaining the number of files in some path and the list of them. At that time, I did not know the existence of _FileListToArray. So, here is how I solved my problem: 1) runwait to execute "dir /b [path and criteria] >somefile.txt" 2) openfile to open somefile.txt 3) fileread to read in binary mode the full content of such file 4) stringsplit using delimiter @crlf to result an array with the number of files and their names. Indeed, in my problem I always work with a short list of files, so I am not worried about performance, but after discovering _FileListToArray I wish to know what do you think about this solution. I'm just curious. Thanks. Edited March 30, 2008 by Zomp Link to comment Share on other sites More sharing options...
weaponx Posted March 31, 2008 Share Posted March 31, 2008 There is no way to get a list of files without some sort of recursion. There is a function here that uses "dir" method to do the same thing you are doing:http://www.autoitscript.com/forum/index.ph...t=0&start=0 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