GetFilesInFolder

From GECK
Jump to: navigation, search


A function added by the Lutana NVSE plugin, now part of the JIP NVSE Plugin.

Description

Returns an array of filenames (string_vars) in a subdirectory relative to the ".\Data" folder. Wildcards may be used in the 'filter' string, e.g. "*.nif"

The filenames returned include the file type (.nif, .esp, etc.).

Syntax

[help]
(array) GetFilesInFolder folderpath:string filter:string 

Or:

(array) GetFiles folderpath:string filter:string 

Syntax and Usage

array_var Array

let Array := GetFilesInFolder "Config/Config.ini"
array_var Array
string_var Path

let Path := "Config/Config.ini"
let Array := GetFilesInFolder $Path

To get all files in the Data folder itself, pass an empty string to the folderpath parameter:

let aFiles := GetFilesInFolder "%e"

See Also