Sublime Forum

Is there a way to clean the non-existant files from '..\Session.sublime_session'


In the ...\Sublime Text\Data\Local\Session.sublime_session file there lies a lot of info relating to the session and other previous sessions.

I was wondering if anyone knows if someone that has written a ps or batch file to parse that file above and clean the folders and files that no longer exist.

I could write something myself but there’s no point in reinventing the wheel if someone has already done it.

Sublime Text has to be closed in order for this to happen so another way could be a new feature that could be added perhaps.



The only one that I’m aware of the one that was linked in this thread by Keith, but it’s written in Python and it only concerns itself with clearing old projects out of the session file. It doesn’t clean the session in general (removing files and folders from recent lists if they no longer exist, etc), primarily because I don’t rely on those as much as the project list.

In fairness it’s been a while since I wrote that so perhaps there’s something out there now that would do something like this that wasn’t available when I originally wrote this one.

1 Like


Thanks, I did try that one but it never rid that file in question. Probably due to ST needing to be closed in order to do so.

edit: no sorry, I didn’t try it but as you said it removes dead projects but the Project manager plugin does this anyway.

I was hoping for more of a deep clean thingy. :slight_smile: