Jump to content

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:

Link to comment
Share on other sites

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

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

:mellow:

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...