Often I use Visual studio to edit standalone files (not in a project). So usually I will have like say 6 files opened (3 html files, 1 css file, 2 js files etc)
And the problem is that whenever i close visual studio, I have to locate and re-open all 7 files again (which is a bother really).
Is there a way for us to like save all 7 files in a state file and simply when i open that state file it will open all the 7 files in whatever order I have last saved them as ?
If you have used Notepad++ you will know what I’m talking about, basically when we close Notepad++ and open it the files that were previously opened stay opened, some sort of functionality like this.
Here’s two Visual Studio macro methods that should do exactly what you need.
SaveAll() saves all open files and writes a file named status.txt to C: in which all open files are written separated by semicolon (totally independent of project/solution):
Next time, when you want to open those files, you simply call OpenAll(). It reads the status file, splits the semicolon separated text, and opens all files:
It’s easy enough to modify this according to your needs (or even add a file dialogue). Thanks for asking this question, it made me focus on the VS macro IDE again and see how powerful it is.