Jump to content

_FileListToArrayRec Wildcard Masks


Recommended Posts

Hi,

Is it possible with _FileListToArrayRec to create a mask like this:
(name)(space)(unknown sequence number)(space)(filetype)

For example with regexp it'd be like this:

Global $Name = "Lorem ipsum5 (dolor) s[it] a_met"
Global $FileType = "(.psd|.ai|.blend)"

Global $Pattern = "^((" & $Name & ")" & "(\h)(\d+)(\h)" & $FileType & ")$"


 

 

Link to comment
Share on other sites

It seems it's not possible with _FileListToArrayRec to use a regex in the mask parameter.

You can do it in two times :

1 - Get the list of files $array = _FileListToArrayRec($PATH, "*.ai;*.psd;*.blend")

2 - A loop from 1 to $array[0] which checks if the pattern matches with each file name and build the array that you want

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...