View Full Version : Help with wildcards

02 February 2006, 12:04 AM
Help a newb out plz :)

Everything works fine, but I need for the final part of this to search for any text +.tga

I tried texPath = textureName + "**.tga", but that gave no love :)

here is the code

textureName = maxfilepath + (getFilenameFile maxfilename)
format "%\n" textureName

texPath = textureName + "**.tga" -- ** because name may change per folder

Thanks for any help,


02 February 2006, 01:53 AM
If I understand this right, then for each folder you should build an array with your files, filterstring each element for "." and compare the second item in the result to "tga" then collect the first.

Hope it helps!

02 February 2006, 04:27 AM
under "String Literals", it mentions the use of control characters inside a string... which includes your * (which is probably the cause of the error)

and yup, you could try what vasilescu_anton is saying by using the getFiles function under "External File Methods"


02 February 2006, 06:20 AM
Thank you very much for your help. I am able to pull the files now.

Thank you.


CGTalk Moderation
02 February 2006, 06:20 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.