Jump to content
Sign in to follow this  

Determine filenames in dir

Recommended Posts


Hello. I am using this code;

local $nrFiles
$nrFiles = DirGetSize(@scriptdir & "\xxxx\", 1)

To determine how many files there are in the "xxxx" directory. This works nice. $nrFiles[1] gives me back the number of files in this dir.

What i'm trying to accomplish is to read the filenames in this dir. The filenames are variable and never the same so i cant use Fileopen("thisfile.bla").

I had a look in the helpfile but the closest what i could find was FileGetShortName and FileGetLongName. The thing i need is "FileGetName".

Does anyone have a clue how to determine the filenames in the dir?

Thanks in advance :mellow:

Share this post

Link to post
Share on other sites

#include <Array.au3>
#include <File.au3>

$Path = @DesktopDir & "\"
$List = _FileListToArray($Path)



A minesweeper game created in autoit, source available.


An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post

Link to post
Share on other sites

Ah, yes got it just after i posted this. Thanks anyway :mellow:

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.