Restore txt files in the Doc Switcher?
-
I had many txt files in here, most of them saved but some were not:
![https://i.imgur.com/bkRZSBz.png](image url)I started Notepad and the drive those txt files were stored on was not plugged in so there was none of them shown in Notepad. When I open Notepad with that drive plugged in they are not show again as well. How could I make the Doc Switcher show (or may be there is another way) all of the files, saved and not saved ones again?
-
@Cletos said in Restore txt files in the Doc Switcher?:
I started Notepad and the drive those txt files were stored on was not plugged in so there was none of them shown in Notepad.
There is the backup path listed under Settings, Preferences, Backup. That’s where tabs which were opened when Notepad++ was closed will be located (if the option has been ticked). If you have decided to change that path to a removable drive then frankly I think that’s madness. That backup location needs to be ALWAYS available to Notepad++.
All that aside, looking in that folder location you should see a number of files called
new 1
,new 2
etc appended with@2021-xx-yy-zzzzzz
, where the xx are months, yy are date and zzzzzz is time. So you could open those files and recreate new 1 new 2 etc tabs again. As long as remember current session for next launch is ticked these files will re-appear if left open when closing Notepad++.But please change your backup location to a permanent drive otherwise you will find yourself in the same situation down the track.
Terry
-
![https://i.imgur.com/bkRZSBz.png](image url)
I think you meant
![alt text](https://i.imgur.com/bkRZSBz.png)
(Notice the placeholder “image url” are where the image’s URL goes, not overtop the “alt text”, which is where the image’s alternate text goes)
… which would render as …
But, it appears your image doesn’t supply us with much…
I am interpreting that you had many files open, some of which were saved and some of which were unsaved. You were relying on Notepad++'s periodic backup of edited files, rather than saving to a known location. Then the next time you ran Notepad++, the drive where most of the files was disconnected, so Notepad++ couldn’t see the files.
Assuming I have interpreted correctly, the next events that I imagine happened: Notepad++ made a “mental note” that those files don’t exist, so it treats them as if they had been closed. When Notepad++ closes a file with unsaved edits, it removes them from its session state (so that the next time Notepad++ closes, the session.xml file will save without listing those files), and most likely treated them as if you had closed them with intentionally not saving, thus deleting the periodic backups. (The backup settings’ “session snapshot and periodic backup” feature only keeps backups of unedited files for as long as they are open; under normal circumstances, as soon as the file is closed, whether or not you decided to save when it was closed, it deletes the periodic backup. The session’s periodic backup is not a long-term/permanent backup; for that, you need to use the backup-on-save, but that permanent backup only works when you actually save the file.)
… and @Terry-R beat me to the rest of what I was going to say.
-
There is the backup path listed under Settings, Preferences, Backup. That’s where tabs which were opened when Notepad++ was closed will be located (if the option has been ticked). If you have decided to change that path to a removable drive then frankly I think that’s madness. That backup location needs to be ALWAYS available to Notepad++.
Yes, it is like that here. So all of the saved files seem to be available in that folder.
All that aside, looking in that folder location you should see a number of files called new 1, new 2 etc appended with @2021-xx-yy-zzzzzz, where the xx are months, yy are date and zzzzzz is time.
So files like these:
new 9@2021-06-28_101256
new 2@2021-06-20_214802Are these file those ones not manually being saved?
But please change your backup location to a permanent drive otherwise you will find yourself in the same situation down the track.
The path already goes to a folder always being available.
Thank you Terry.
… which would render as …
Yes, sorry, thank you for correcting.
Assuming I have interpreted correctly
Yes yes, absolutely.
Assuming I have interpreted correctly, the next events that I imagine happened: Notepad++ made a “mental note” that those files don’t exist, so it treats them as if they had been closed. When Notepad++ closes a file with unsaved edits, it removes them from its session state (so that the next time Notepad++ closes, the session.xml file will save without listing those files), and most likely treated them as if you had closed them with intentionally not saving, thus deleting the periodic backups. (The backup settings’ “session snapshot and periodic backup” feature only keeps backups of unedited files for as long as they are open; under normal circumstances, as soon as the file is closed, whether or not you decided to save when it was closed, it deletes the periodic backup. The session’s periodic backup is not a long-term/permanent backup; for that, you need to use the backup-on-save, but that permanent backup only works when you actually save the file.)
So the unsaved files respectively their back ups are lost forever. Cannot be restored.
I have those settings:
Many thanks!
-
@Cletos said in Restore txt files in the Doc Switcher?:
I have those settings:
The first “Backup path” says unsaved files get snapshots into
J:\Programme\Notepad++\backup
, until such point as they are saved or closed, at which point the backup goes away.The second “Custom Backup Directory” setting means that manually saved files get backed up (with a verbose
blah.txt.timestamp.bak
into the same folder.So the unsaved files respectively their back ups are lost forever. Cannot be restored.
You might be able to use file recovery software like Recuva or similar, but there is no guarantee that will work for you.
Saving files, and using external backup software / version control software / cloud storage are your best bet against data loss.