Page 1 of 1

Searching for Partial File Name or File Prefix?

Posted: Mon Oct 05, 2020 8:51 pm
by OWS
Is there a way to search for a partial file name? For example, if I want to save level data on in a file with the prefix LEVEL + a descriptor is there then a way to search for files that start with LEVEL so that a level could be loaded from that save file? (Each of my levels can be stored in a single simple array or list.)

In the past, I've got around this by having a secondary save file that stores all the file names. But I'm curious if there is a better way to make this happen.

Re: Searching for Partial File Name or File Prefix?

Posted: Mon Oct 05, 2020 9:32 pm
by Joel
Hi there,

To do this you would need to use ES3.GetFiles to get the names of all of the files from the directory, and then search through this yourself.

Hope this helps!

All the best,
Joel

Re: Searching for Partial File Name or File Prefix?

Posted: Tue Oct 06, 2020 1:41 am
by OWS
Perfect! Thank you. Not sure how I missed that one. Much appreciated!