Access the file explorer

i want to save my process in the game I got that working but what I don’t is how I can make the player decide where to save the files

There is some expressions for get a folder.

There is no way at the moment to get the file explorer for save as or open a file with the actions.

But witch one is it bouh

Cant you just send the code

There isn’t a “which one is it”. You need to use the majority of expressions in combination (User folder path or game folder path, path delimiter, etc) to build out whatever folder you want.

You’d also need to figure out how to translate where ever the user decides they want to save, into those expressions.

There isn’t code we can give you since you have to build it for your specific scenario.

1 Like

just a thought
What you can do is inside your game with some sort of modal show the user different folder where he can save.
For instance:
A modal
Where do you want to save your game?
Checkbox [] /Desktop
Checkbox [X] /Documents
Checkbox [] /Username
Save btn - Cancel btn

So you predefine the folder in your game and let the user decide where but limited to that 3 locations.

1 Like

No absolutely no because it depend of what you need and i work aside of GDevelop, i’ve no more time for doing the work for you or eveyone.
Imagine if everyone ask like you do.

You can access the system file explorer to open and get a file name with something like this if you want to add a javascript subevent:

// Create an input element
var inputElement = document.createElement(“input”);

// Set its type to file
inputElement.type = “file”;

// set onchange event to call callback when user has selected file
inputElement.addEventListener(“change”, callback)

// dispatch a click event to open the file dialog
inputElement.dispatchEvent(new MouseEvent(“click”));

function callback () {

I have not had a chance to explore further. You could use this to open and get a directory path maybe but I am still trying to work with events to see what is possible or not.