How to save 2000 files at once
-
Hi so here is my problem: I have notepad++ with about 2000 tabs open, all unsaved, all information I’d like to keep
Can anyone advise how I can save these files all at once?
I’ve tried a plugin called autosave2 but it just crashes
Obviously I can press file save as 2000 times but dont want to do that…
-
use save as admin plugin
-
A tiny detail you’ve overlooked to specify: How are these files to be named?
@gurikbal-singh
That’s just a ridiculous suggestion.
-
Hello @a-s243, @alan-kilborn, @gurikbal-singh and All,
Oh, my God ! Personally, I cannot imagine my N++ Window containing two thousand
new #
opened, simultaneously, in a single N++ session !! ??Probably, it should be
200
, shouldn’t it ?Best regards,
guy038
-
@guy038 said:
Probably, it should be 200, shouldn’t it ?
Ha. I’m sure it is 2000. Why? Because there are a lot of bizarre requests in this forum!
Just like people never give enough background to receive good regex help, it would be nice to know the HOW and WHY of 2000 unsaved files.
-
ok yeah so,
a) yes i know this is dumb, this is the result of about 3 years of opening a new tab everyday and writing notes in it. we can accept i’m dumb and move on from here
b) how should they be named? not bothered, just want to be able to grep it for info
-
you know, that unsaved files are saved files on disk already, aren’t you?
Check your backup directory, there are your unsaved files. -
yes i know this is dumb, this is the result of about 3 years of opening a new tab everyday and writing notes in it.
This is downright bizarre!
we can accept i’m dumb and move on from here
Yes we can!
You could save the files to independent files on disk with the Pythonscript plugin and the following:
import os for (filename, bufferID, index, view) in notepad.getFiles(): if filename.startswith('new '): notepad.activateBufferID(bufferID) if editor.getModify(): filename = os.environ['TEMP'] + os.sep + filename.replace(' ', '') + '.txt' notepad.saveAs(filename) else: notepad.close()
It would put your files in your
%TEMP%
folder. Change that to whatever you want. -
Ctrl-Shift-S saves all open files.
Is it not working? what is your issue?
or you mean you have not even saved the files even first time, so there is no name or location of these files to auosave?
Thanks.
-
@V-S-Rawat said:
or you mean you have not even saved the files even first time, so there is no name or location of these files
Well that is at least the supposition.
-
Well that is at least the supposition.
:-) not so obvious. unsaved could mean - opened from hard disk, but not saved after making changes.
Anyway - would you like to share how you created those 2000 tabs? how did you put different data in those 2000 tabs?
on that basis, maybe I or someone can tell some method that such data can be directly put to hdd txt files, instead of bringing npp in between, or maybe a pythonscript macro can run while you put those data in 2000 tabs, so that each tab/ file is saved on hdd as it is created.
Thanks.
-
this is the result of about 3 years of opening a new tab everyday and writing notes in it.
oh my God.
I surrender.
-
one method could still be:
install “Autobackup” plugin of npp, there are 2-3 of that type, you need to study which one will serve your purpose.
As soon as you install this plugin, it will make backup of all opened tabs in the backup folder (see in configuration - backup), so you have all 2000 tabs saved on hard disk. you move all 2000 files elsewhere, and you get what your asked for.
-
I have been experiencing problems like that too in 2025 year. Easy way simple 6 steps here:
CLOSE all opened Tabs, and Save to own folder
Step 1: Go to and Copy
Notepad++
Settings / Preferences / Backup / Backup pathCopy C:\Users\Mongolz\AppData\Roaming\Notepad++\backup\
Step 2: Open and Write cd Paste
Open Command Prompt: Windows Key + R, writecmd
and press Enter.
Writecd
and PasteC:\Users\Mongolz>
cd C:\Users\Mongolz\AppData\Roaming\Notepad++\backup\
press Enter.
C:\Users\Mongolz\AppData\Roaming\Notepad++\backup
Step 3: Rename
Rename all files within folder
Writeren *.* *.txt
C:\Users\Mongolz\AppData\Roaming\Notepad++\backup>
ren *.* *.txt
press Enter.
Result:
When you close the files will not be required one by one to SAVE
Write one line code and Saved all files. So that all files can be closed directly.Step 4: Close All
Notepad++
File / Close All or Ctrl+Shift+W
Done!!!Step 5: Go to and Copy
Notepad++
Settings / Preferences / Backup / Backup pathCopy C:\Users\Mongolz\AppData\Roaming\Notepad++\backup\
Step 6: Open and Paste. Select all files and Cut. Paste
Open Windows Explorer and Paste Address bar. press Enter.
Select all files and Cut.
Select your Folders and Paste.
All done!!! -
If you find you have made a mistake in a previous post, but are no longer able to edit your post in the
⋮
menu, please make sure you use the⋮
menu’s Delete action to delete the old ones. Having three copies of the same post is confusing to readers. (I used moderator power to delete the first two of your three copies).Oh, wait, you probably completely ignored the message that was interrupting your post composition which told you that the post had to go through an approval queue so it wouldn’t show up immediately, so you got impatient when you didn’t immediately see the post appear. For the future, new users with no reputation (upvotes) have their posts go through an approval queue to make sure they aren’t spammers/bots; please just post once, then be patient until a moderator is available to approve your post.
I have been experiencing problems like that too in 2025 year.
No matter what year it is, having 2000 unnamed files open is a bad idea. But nothing anyone says, nor even the loss of 2000 files’ worth of data, is enough to convince some users that it’s a bad idea, so, here we are.
Before Step 1 (so I’ll call it “step 0”), you said to:
CLOSE all opened Tabs, and Save to own folder
Um. The premise of the original post was that there were 2000 unsaved/unnamed files. CLOSING all opened Tabs would bring up 2000 “Save As” dialogs, which is precisely what the original poster, 6 years ago, was trying to avoid. So, you just told them to do the opposite of what they wanted to accomplish. Congratulations.
Step 1: Go to and Copy
Notepad++
Settings / Preferences / Backup / Backup pathCopy C:\Users\Mongolz\AppData\Roaming\Notepad++\backup\
Actually, that’s a suprisingly good idea, coming from someone who started off so badly. Well, it would have been, if it had been implemented correctly. But it was a good idea, anyway.
Correcting the cmd.exe command to
copy %AppData%\Notepad++\backup\*.* c:\some\other\path\
would be the best solution to the original problem.Reason for each change:
- use
%AppData%\Notepad++\backup\
rather than hardcodedc:\users\....
, because you have NO WAY of KNOWING that any given user’s AppData hierarchy is- In windows, it is possible to redirect the various “built in” folders like “AppData” and “Documents” and the like to other paths or even other drives. For anyone who has done that for any reason (for example, because the c: SSD boot drive is just big enough for c:\windows, and everything else is put on a bigger d: HDD)
- if you don’t know what
%AppData%
notation is, we have a FAQ on that
- include a destination in the
copy
command –copy
doesn’t work without a destination.
Alternatively, just use Windows Explorer, navigate to
%AppData%\Notepad++\backup\
(you can just paste that path in the path bar of your Explorer window), copy everything, navigate to the new directory in Explorer, and paste.Step 2: Open and Write cd Paste
After you’ve already done the copy, there is no reason to CD into the original directory.
Step 3: Rename
Rename all files within folder
Writeren *.* *.txt
Horrible advice!
- You are doing the rename in the original location, after you had already copied the files elsewhere. You should be working on the copies, not the originals
- If you had two files like
project.cpp
andproject.h
with the same name but different extension in the same directory, then ran that command, you would get the error> ren *.* *.txt A duplicate file name exists, or the file cannot be found.
- Further, there is no reason to rename the files in the first place: since they’ve already been copied elsewhere, at this point, you can just close all the unnamed files without saving, and then when ready, open the new copies of the files from the new location: using right click, or dragging into Notepad++, it wouldn’t have to be a
.txt
file to be automatically opened with Notepad++. And not all unnamed files should become.txt
– there may be unnamed C++ or HTML or XML or … (list all 90 built-in languages) … files as well.
However, to temper my “horrible idea”, as it explains in the “Unnamed files” section of our backup FAQ, the files would have been named like
new NNN@yyyy-mm-dd_hhmmss
, so your rename would have been “safe”, for a loose definition of the word “safe”. For example, if the user had happened to rename their tab fromnew NNN
tosomething.else
with a dot in it (and yes, some people do rename their unsaved tabs, as it gives Notepad++ a default name when they get around to running Save/SaveAs, or to use as a title even when they haven’t saved it), then there could have been clobbers (something.1@2025-02-06_121314
andsomething.else@2025-02-06_232425
would both try to rename tosomething.txt
, which is obviously not going to work.)Result:
When you close the files will not be required one by one to SAVE
Write one line code and Saved all files. So that all files can be closed directly.WRONG.
The result of your exact steps would be that, (1) all the unnamed/unsaved files would have already prompted for saving, defeating the point; (2) the copy as described would have failed because there was no destination; (3) the rename might have failed if two of the backup files shared the same name before a
.
in the tab’s name before the process was started.----
So the right advice, going from the general idea, but in a sequence that will work, and doesn’t require dropping to
cmd.exe
which most people don’t know how to use- Initial Condition =
- 2000 unnamed/unsaved files are open in Notepad++, by whatever dark miracle caused such a horrendous situation
- Settings > Preferences > Backup is set to Enable session snapshopt and periodic backup with
7
seconds (or whatever time you prefer) - You have waited at least
7
seconds (or whatever time you have set) since the last time you made any change in Notepad++ - You are using normal AppData-based Notepad++, and not the Cloud or Settings Dir or
doLocalConf
- Copy from Notepad++'s “periodic backup” location to a known directory:
- Open Windows Explorer (
Win+E
), and type%AppData%\Notepad++\backup
into the Explorer bar, so that it navigates to that directory. - Copy all the contents of that directory
- Navigate to your new, known location, where you want permanent copies of the file
- Paste in that new directory
- Open Windows Explorer (
- In Notepad++, do File > Close All, and when prompted, say No to all
- this will prevent being asked 2000 times
- your data is safe, because you already copied it
- In the future, when you want to open the files you “saved”, go to the “new, known location” from step 1.3 above, and open the files using Notepad++.
- the names won’t be meaningful, but at least they will be saved files, so you can access them safely in the future.
- Follow the steps in the aforementioned backup FAQ to set up AutoSave or similar, and don’t get yourself into a situation ever again where you have 2000 unsaved files
- unfortunately, AutoSave 2.0 doesn’t help you protect the
new ###
tabs like its earlier versions did. That was a major step backward in functionality, IMO - whenever you create a
new ###
file, if there is greater than 0% chance that you will want the data to last more than a couple minutes, I recommend immediately doing File > Save As to a known location, and give it a meaningful name, so you will know what the contents of the file will be (havingnew 1
tonew 2000
makes it impossible to know which of the 2000 files contains what piece of information; having 2000 logically-named files at least gives you a chance of being able to find something.)
- unfortunately, AutoSave 2.0 doesn’t help you protect the
- use
-
-
About Notepad++ Usage:
-
About My Written comment:
-
About Notepad++ Usage:
I use Notepad++ only for note-taking. Sometimes I write, and other times I open a new tab to copy things to read later. On some days, I might create 0 to a few tabs, while on other days, I could create 10 or even 20 tabs just by clicking.
It’s easy to use because you can have multiple tabs in one window, and it’s lightweight. The ability to undo actions is also a reason I use Notepad++. There’s no risk of losing what I’ve written if I make a mistake because I can undo it.
It doesn’t require me to hit the SAVE button, which is convenient. I’ve never named a tab intentionally either. Even if the Notebook shuts down, my notes in Notepad++ remain available.
Having multiple tabs or files without specific names can be easier, as coming up with names can be tedious. I can easily find what I need using the “Find All in All Opened Documents” command. When I have around 300 or 400 tabs open, I use this method to manage them.
- About My Written comment:
What need did I have? I needed to search for information from many text files that I had moved to another folder. To open them in Notepad++, I had to close all currently open tabs.
I hesitated to use the “Close All” command and selecting “No to All” because I mistakenly thought the files might be permanently deleted. I then followed the first three steps of the six-step method to achieve my goal.
My advice is that for people like me who use Notepad++ strictly for notes, there won’t be issues, but I acknowledge it was my mistake not considering all scenarios. For example, my method might not be suitable for those who use Notepad++ for coding, like with project.cpp or project.h files.
I fully support your advice on the 0-4 steps; it will definitely help many people.
Regarding Inexperienced Users Submitting the Same Feedback Multiple Times:
Case 1: Unclear Uncertainty For inexperienced users, if their written comment doesn’t appear immediately, they might wonder if they actually clicked the send button. This leads them to think they might have lost their comment and decide to rewrite and resend it.
Case 2: Repeated submissions may inconvenience moderators and frustrate them. Perhaps they might not notice the explanation in the bottom corner of the screen?
Probability: If the system doesn’t change, such two situations will likely continue to occur.
If “Case 1” doesn’t happen, “Case 2” won’t happen either.
Why did “Case 1” occur? Is it a problem? Yes.
Lesson: If there is a problem in the system, can identifying and addressing the root cause prevent it from recurring? Yes.
“Problem 1” is: The “waiting queue reminder” is not reaching inexperienced users. Users might overlook a short message that appears in the bottom corner for only a few seconds or fail to understand it due to language barriers.
Note: I, too, missed this notification the first few times I posted comments. I tried to read it carefully, but it disappeared too quickly. I checked for any notifications and found nothing. By the time I sent my last comment, I was prepared. I realized the message referred to being in a “waiting queue” after quickly taking a screenshot before it vanished.
Solutions to “Problem 1” could include:
After a user submits a comment, a small window with the "waiting queue reminder" appears in the bottom corner and disappears. After it disappears, it smoothly moves up into the Notification area. After submitting a comment, it appears as if published immediately, while the "waiting queue reminder" remains visible, but only the user who submitted the comment can see it, not others.
-
-
I use Notepad++ only for note-taking. Sometimes I write, and other times I open a new tab to copy things to read later. On some days, I might create 0 to a few tabs, while on other days, I could create 10 or even 20 tabs just by clicking.
I might suggest installing the plugin called TakeNotes. Its description as shown in the Plugins Admin:
Helps people who like to use Notepad++ for jotting quick notes. Instead of using unnamed ‘new ?’ files, this plugins allows to quickly create new empty files in a folder of choice. The file names may be custom generated using a mask and may contain details such as the user name, date, and time of creation so that unique files may be generated. Additionally, the plugin allows to load exiting notes in the folder of choice, save existing files as a note, and open the last saved note quickly. Please refer to the Options dialog box for more details. It is strongly recommended to use this plugin in combination with AutoSave to make sure that you never loose a note. Based on your description, this plugin (especially combined with the author’s AutoSave plugin) will provide you with both the functionality you seem to want, plus the safety of always having your files saved somewhere rather than just relying on the session-snapshot+periodic-backup
Perhaps they might not notice the explanation in the bottom corner of the screen?
…
Users might overlook a short message that appears in the bottom cornerI am confused how that can happen. When I use my dummy account with no reputation to start a new post, I see:
The big purple message box doesn’t just “disappear”. I have to manually click the X to be able to start typing my first post in that account. If you choose to ignore the contents of the box and just click the X, there’s not much I can do from a User Interface perspective to stop you from doing that. When I do click the X and then type and try to post, I see the “temporary” popup in the corner for about 10-15sec. But even if I missed that one, there was still the big purple box that was there when I first posted. If I try to make a second post before my earlier one is approved, because I didn’t see my first, I see the big purple box again, that I again have to click X on. And if I get a first post approved, when I try to make a second real post with no reputation, I still get the big purple box.
Are you sure you’re not getting that box every time, and just clicking X without reading it? (If you are using a different color scheme in the forum, it might not be “purple”, but it should get in the way of you entering any post.)