Jump to content

SKSE64 leaving save fragments in save folder


7531Leonidas

Recommended Posts

I was familiar with the extra .skse file that was generated in the save game folder for each save, but now, I get multiple .skse files not paired with a quicksave or autosave, over 80, and I haven't even gotten through Bleak Falls yet. Saves made from the menu do not seem to have this problem. Is there something I have done wrong? I do have skyUI and hide skyUI installed, along with AMOT. (And 200+ other mods.)

Link to comment
Share on other sites

That's a bug in SKSE64. It's not cleaning the co-save files when the main save gets deleted by the game. So there will be a bunch of autosave leftovers after extended play. When you're finished with a game session make a regular (not quicksave or autosave) save and then you can go into the save folder and delete all of the quick and autosave files without losing anything of value.

 

I did that for a while before eventually breaking down and writing this little WSH script to only delete any SKSE files that don't have a matching ESS file. It's not pretty but gets the job done with a simple double-click.

// CleanLeftoverCosaves.js - a WSH script to clean leftover SKSE cosave files
var fso = new ActiveXObject("Scripting.FileSystemObject");
var folder = fso.GetFolder(".");
var subFlds = new Enumerator(folder.Files);
var files = {}
for (; !subFlds.atEnd(); subFlds.moveNext()) {
	var n = subFlds.item().name
	if (n.match(".ess"))
		files[n.replace(".ess", "")] = 1
}
subFlds = new Enumerator(folder.Files);
for (; !subFlds.atEnd(); subFlds.moveNext()) {
	var n = subFlds.item().name
	if (n.match(".skse"))
		if (!files[n.replace(".skse", "")])
			subFlds.item().Delete()
}

If you save that into a file named "CleanLeftoverCosaves.js" and put it in your saves folder you can click on it to clean the leftovers whenever you like. The script needs to be in the saves folder but you can right-click on it and create a shortcut then put that shortcut somewhere easier to access. (Alternately you could edit the second line so that GetFolder looks in a specific folder instead of "." which is the same as the script itself but I find making a shortcut much easier than looking up folder path names.)

Link to comment
Share on other sites

That's a bug in SKSE64. It's not cleaning the co-save files when the main save gets deleted by the game. So there will be a bunch of autosave leftovers after extended play. When you're finished with a game session make a regular (not quicksave or autosave) save and then you can go into the save folder and delete all of the quick and autosave files without losing anything of value.

 

I did that for a while before eventually breaking down and writing this little WSH script to only delete any SKSE files that don't have a matching ESS file. It's not pretty but gets the job done with a simple double-click.

// CleanLeftoverCosaves.js - a WSH script to clean leftover SKSE cosave files
var fso = new ActiveXObject("Scripting.FileSystemObject");
var folder = fso.GetFolder(".");
var subFlds = new Enumerator(folder.Files);
var files = {}
for (; !subFlds.atEnd(); subFlds.moveNext()) {
	var n = subFlds.item().name
	if (n.match(".ess"))
		files[n.replace(".ess", "")] = 1
}
subFlds = new Enumerator(folder.Files);
for (; !subFlds.atEnd(); subFlds.moveNext()) {
	var n = subFlds.item().name
	if (n.match(".skse"))
		if (!files[n.replace(".skse", "")])
			subFlds.item().Delete()
}

If you save that into a file named "CleanLeftoverCosaves.js" and put it in your saves folder you can click on it to clean the leftovers whenever you like. The script needs to be in the saves folder but you can right-click on it and create a shortcut then put that shortcut somewhere easier to access. (Alternately you could edit the second line so that GetFolder looks in a specific folder instead of "." which is the same as the script itself but I find making a shortcut much easier than looking up folder path names.)

 

Many thanks for this very useful script! :woot:

 

All this time I was deleting the co-saves without a matching ESS savefile manually, and after many hours or days playing the game, that list of "never-deleted" co-saves was always really, REALLY long... :wacko:

Obviously it doesn't fix the bug, but it really helps with the cleaning :thumbsup:

 

Cheers! :D

Edited by Azrael360
Link to comment
Share on other sites

  • 2 months later...

Ive been having this problem and i want to fix it, i just cant figure out how to save or run that script!!! im on windows 10 and i dont know how to save that as a script or run it. any help?

 

edit: nevermind after some searching i figured it out. all the you have to do is create a text document, like on your desktop for example, and save it as ".js". then it will make it a script file. problem solved.

Edited by Wiitard77
Link to comment
Share on other sites

That's a bug in SKSE64. It's not cleaning the co-save files when the main save gets deleted by the game. So there will be a bunch of autosave leftovers after extended play. When you're finished with a game session make a regular (not quicksave or autosave) save and then you can go into the save folder and delete all of the quick and autosave files without losing anything of value.

 

I did that for a while before eventually breaking down and writing this little WSH script to only delete any SKSE files that don't have a matching ESS file. It's not pretty but gets the job done with a simple double-click.

// CleanLeftoverCosaves.js - a WSH script to clean leftover SKSE cosave files
var fso = new ActiveXObject("Scripting.FileSystemObject");
var folder = fso.GetFolder(".");
var subFlds = new Enumerator(folder.Files);
var files = {}
for (; !subFlds.atEnd(); subFlds.moveNext()) {
	var n = subFlds.item().name
	if (n.match(".ess"))
		files[n.replace(".ess", "")] = 1
}
subFlds = new Enumerator(folder.Files);
for (; !subFlds.atEnd(); subFlds.moveNext()) {
	var n = subFlds.item().name
	if (n.match(".skse"))
		if (!files[n.replace(".skse", "")])
			subFlds.item().Delete()
}

If you save that into a file named "CleanLeftoverCosaves.js" and put it in your saves folder you can click on it to clean the leftovers whenever you like. The script needs to be in the saves folder but you can right-click on it and create a shortcut then put that shortcut somewhere easier to access. (Alternately you could edit the second line so that GetFolder looks in a specific folder instead of "." which is the same as the script itself but I find making a shortcut much easier than looking up folder path names.)

 

Handy! Thank you very much.

Link to comment
Share on other sites

  • 1 month later...

Ive been having this problem and i want to fix it, i just cant figure out how to save or run that script!!! im on windows 10 and i dont know how to save that as a script or run it. any help?

 

edit: nevermind after some searching i figured it out. all the you have to do is create a text document, like on your desktop for example, and save it as ".js". then it will make it a script file. problem solved.

I just copy the script from cdcooley's post then I paste it in Notepad++ and selected the Save as... command then change the filename to CleanLeftoverCosaves.js and doing that seems to work.

Edited by leonardo2
Link to comment
Share on other sites

Sorry for the noob question: whenever I double-click the .js file, it opens up in Notepad. What's the default program to run this script? I'm on Windows8.1 by the way.

 

-EDIT-

Found the solution. For those who has problem like me where a particular program associated itself with .JS files, just follow this link and it should reset the .JS file to its default Windows Script Host thing.

Link to comment
Share on other sites

  • 2 weeks later...

That's a bug in SKSE64. It's not cleaning the co-save files when the main save gets deleted by the game. So there will be a bunch of autosave leftovers after extended play. When you're finished with a game session make a regular (not quicksave or autosave) save and then you can go into the save folder and delete all of the quick and autosave files without losing anything of value.

 

I did that for a while before eventually breaking down and writing this little WSH script to only delete any SKSE files that don't have a matching ESS file. It's not pretty but gets the job done with a simple double-click.

// CleanLeftoverCosaves.js - a WSH script to clean leftover SKSE cosave files
var fso = new ActiveXObject("Scripting.FileSystemObject");
var folder = fso.GetFolder(".");
var subFlds = new Enumerator(folder.Files);
var files = {}
for (; !subFlds.atEnd(); subFlds.moveNext()) {
	var n = subFlds.item().name
	if (n.match(".ess"))
		files[n.replace(".ess", "")] = 1
}
subFlds = new Enumerator(folder.Files);
for (; !subFlds.atEnd(); subFlds.moveNext()) {
	var n = subFlds.item().name
	if (n.match(".skse"))
		if (!files[n.replace(".skse", "")])
			subFlds.item().Delete()
}

If you save that into a file named "CleanLeftoverCosaves.js" and put it in your saves folder you can click on it to clean the leftovers whenever you like. The script needs to be in the saves folder but you can right-click on it and create a shortcut then put that shortcut somewhere easier to access. (Alternately you could edit the second line so that GetFolder looks in a specific folder instead of "." which is the same as the script itself but I find making a shortcut much easier than looking up folder path names.)

@cdcooley -

Thank you very much for this script. There were HUNDREDS of orphaned files in my save folder, and now there aren't. Thanks again!

Link to comment
Share on other sites

  • 2 months later...

I don't know if this will be ever be answer but I just used this script and it work but now want to know how it works because I thought they would go to my recycle bin?

Edited by lowse
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...