Using the fileSaver module on gitHub, I can save a file using the following code:
var file = new File([data], "jData" + timestamp + ".txt", {type: "text/plain;charset=utf-16"});
saveAs(file);
The Issue
Over time the archived files look messy in the download folder. Is there a way to make the text files nest in a single folder?
if i do:
var file = new File([data], "myArchive/jData.txt", {type: "text/plain;charset=utf-16"});
Then the saved file is the whole string. I am a bit new to the fileSaver and I could use some guidance with saving file in to specific folders and directories.
Solution seeking:
- Is it possible to save the file inside of a folder within the project scope?
- How can I save the file in to an already existing folder?
- When I use "jData.tx"(without the timestamp), the file saver will create a copy file.
Example: "jData(2).txt", "jData(3).txt", "jData(3).txt" ,etc.
- Is there a way to overwrite the same file each time, instead of creating copies?
- Is there another gitHub repository besides the one I am using that can do what I am asking.