Jump to content

SKSE64 leaving save fragments in save folder


7531Leonidas

Recommended Posts

They are deleted just like the code says. In code, delete means delete. Moving them to the recycling bin would have been harder and serve no real purpose.

 

Technically if you put that script in some other folder with files that end in .skse but aren't really SKSE64 co-save files then it could delete the wrong things. But I don't know of any other program that uses the .skse extension and even if you had one why would you use that script on its files?

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

One question, can it be done in a way that when you finish playing (go to the desktop) the .skse files are automatically deleted? Is there any way of doing this?

I think there must be a setting but haven't found doc for SKSE.ini, yet.

Link to comment
Share on other sites

One question, can it be done in a way that when you finish playing (go to the desktop) the .skse files are automatically deleted? Is there any way of doing this?

 

This method may work for you. It deletes orphaned .skse files before launching skse64_loader, instead of after as you requested. SKSE launches a separate process, so I couldn't make my simple batch wait for it to finish. I use a batch instead of the vbscript above.

 

<MO profiles>\<profile>\saves\delfragments.bat

@for /f "delims=;" %%a in ('dir *.skse /b') do if not exist %%~na.ess del %%a

Copy and paste a shortcut to delfragments.bat in <SteamPath>SteamApps\common\Skyrim Special Edition.

Rename the shortcut to delfragments. The shortcut file will have a .lnk extension which is hidden.

Create a batch to launch SSE:

<SteamPath>\SteamApps\common\Skyrim Special Edition\skse64_launcher.bat

@ECHO OFF
"%~dp0delfragments.lnk"
start /i "" "%~dp0skse64_loader.exe"

Add skse64_launcher.bat to MO executables menu, and use it to start Skyrim instead of SKSE.

Edited by Tony_OQuinn
Link to comment
Share on other sites

 

One question, can it be done in a way that when you finish playing (go to the desktop) the .skse files are automatically deleted? Is there any way of doing this?

 

This method may work for you. It deletes orphaned .skse files before launching skse64_loader, instead of after as you requested. SKSE launches a separate process, so I couldn't make my simple batch wait for it to finish. I use a batch instead of the vbscript above.

 

<MO profiles>\<profile>\saves\delfragments.bat

@for /f "delims=;" %%a in ('dir *.skse /b') do if not exist %%~na.ess del %%a

Copy and paste a shortcut to delfragments.bat in <SteamPath>SteamApps\common\Skyrim Special Edition.

Rename the shortcut to delfragments. The shortcut file will have a .lnk extension which is hidden.

Create a batch to launch SSE:

<SteamPath>\SteamApps\common\Skyrim Special Edition\skse64_launcher.bat

@ECHO OFF
"%~dp0delfragments.lnk"
start /i "" "%~dp0skse64_loader.exe"

Add skse64_launcher.bat to MO executables menu, and use it to start Skyrim instead of SKSE.

 

I'll try to see, I guess it does not influence ram consumption start the game from MO2 open, because when you start the game MO2 is blocked and goes to the background and supposedly consumes nothing.
I'll see how it works, thanks!
Link to comment
Share on other sites

 

 

 

I'll try to see, I guess it does not influence ram consumption start the game from MO2 open, because when you start the game MO2 is blocked and goes to the background and supposedly consumes nothing.
I'll see how it works, thanks!

 

 

It shouldn't use any more ram because the dos window closes and process ends when it launches skse. I didn't test how much ram it uses to be honest.

 

Of course this simple script can be expanded to do more fancy stuff, like check all profiles. As it is, if you change profiles you will need to copy defragment.bat and update the shortcut. I'll be glad to help with batch scripting.

 

In MO2, you can create a shortcut to the batch launcher on your desktop or menu bar, the same way you would create a shortcut to any app. When you use an MO2 shortcut whether it's skse, sseedit, or this batch; it will start MO2, mount all the virtual mods, lock and hide MO2 in the background. This should be no different.

Edited by Tony_OQuinn
Link to comment
Share on other sites

 

Of course this simple script can be expanded to do more fancy stuff, like check all profiles.

I updated my script to check all profiles for orphans. If you want yours to do that, use these instructions instead.

 

Create a batch named delete_skse_fragments.bat in your Mod Organizer profiles folder. On my system it's W:\apps\SkyrimSE\ModOrgainizer2\profiles\delete_skse_fragments.bat

@ECHO OFF
cd /d "%~dp0"
for /f "delims=*" %%a in ('dir /b /ad') do if exist "%%a\saves" for /f "delims=*" %%b in ('dir "%%a\saves\*.skse" /b') do if not exist "%%a\saves\%%~nb.ess" del "%%a\saves\%%b"

I use * as a delimiter instead of ; because no file or folder can have * in the name.

 

Now there's no need to use a shortcut, so create a launcher to call this script directly and then start SKSE.

 

<SteamPath>\SteamApps\common\Skyrim Special Edition\skse64_launcher.bat

@ECHO OFF
CALL "W:\apps\SkyrimSE\ModOrgainizer2\profiles\delete_skse_fragments.bat"
cd /d "%~dp0"
start "SKSE Loader" /D "%~dp0" "%~dp0skse64_loader.exe"

Add skse64_launcher.bat to MO executables menu, and use it to start Skyrim instead of SKSE.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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