Hi, super forum~
I want to use an autosave plugin in my game, and this morning I woke up with this idea: in addition to saving by itself, can the game create a backup of the file in a specific directory (a USB, for example) automatically?
I was thinking of copying the save file from one place to another using javascript right after an autosave, but I don't know how to do it... is there a way?
Greetings
If you simply Google "JavaScript copy file" you'll find the code syntax for it. But I would advise against it on the grounds that it's rather complicated and unnecessary.
Complicated: Drive letters for USB devices can change depending on the order that things are plugged into the computer. So the only way to make sure you're backing up to the same place every time is to have the user enter information every time they play, which would be annoying for little to no benefit.
Unnecessary: What game have you ever played that does anything like this? Do you really believe that somehow a player is going to intentionally navigate to the game directory and somehow accidentally delete their save folder? And then somehow be unable to restore it from their recycling bin?
I perfectly understand your point of view and I didn't know about your 2) point; surely I'll use it to regularly back-up my games folder.
Still, since I like to discover new possibilities even if I'm a total javascript noob, and since I'm still interested in copy&paste files through javascript, I'll keep this thread open for a while.
If someone is interested in the same thing or just know how to do it, and wanna share it, I'm here~