Searching for Partial File Name or File Prefix?

Discussion and help for Easy Save 3
Post Reply
OWS
Posts: 2
Joined: Mon Oct 05, 2020 8:45 pm

Searching for Partial File Name or File Prefix?

Post 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.
User avatar
Joel
Moodkie Staff
Posts: 4851
Joined: Wed Nov 07, 2012 10:32 pm

Re: Searching for Partial File Name or File Prefix?

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
OWS
Posts: 2
Joined: Mon Oct 05, 2020 8:45 pm

Re: Searching for Partial File Name or File Prefix?

Post by OWS »

Perfect! Thank you. Not sure how I missed that one. Much appreciated!
Post Reply