Session File is either corrupted or not valid
-
I have read the other posts with this title, but mine is different.
I opened a command-prompt as administrator and tried to execute:
notepad++ -openSession “D:\Users\Pim\Documents\Websitemap KH\Kookhulp iPad\weekmenu.html”
Notepad++ was opened, but the file was not loaded and an error message was shown: “Session file is either corrupted or not valid”."
Because I suspected that the filepath could be too long, I moved the file to C:\weekmenu.html and tried again:
notepad++ -openSession “C:\weekmenu.html”
Unfortunately with the same result.
I removed the folder Notepad++ from %Appdata%, but this didn’t solve the problem.
I also changed the extension from the file to weekmenu.txt, but also that didn’t solve it.
Any ideas? -
I am betting that
weekmenu.html
is an HTML file that you want to open, not a session file which contains a list of files to open in Notepad++'s XML-based session-file format.If you want to edit an HTML file named
D:\Users\Pim\Documents\Websitemap KH\Kookhulp iPad\weekmenu.html
, then you just runnotepad++.exe "D:\Users\Pim\Documents\Websitemap KH\Kookhulp iPad\weekmenu.html"
The
-openSession
command-line option needs to point to a specific session file (which is in Notepad++'s specific session-file XML syntax) which points to one or more files to open (you can create those files through File > Save Session…). It is for opening multiple files at once from a previously-saved session.Learn more about Notepad++'s session feature in the “Sessions” section of the Online User Manual