Jump to content

Recommended Posts

Posted (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 by Zomp

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
×
×
  • Create New...