Windows – Exclude files or folders from System Restore

system-restorewindows 8

How can I exclude folders, files, or certain extensions from being backed up in System Protection's Restore Points and deleted or reverted by System Restore?

I know that My Documents folder wasn't included by default in Windows XP, and I'd like to add other folders to the exclude list as well (e.g. c:\workshop). Now in Windows 8 anything and everything in the root of c:\ gets backed up, and restored. It was really inconvenient when I had to restore last time and I lost all my recent work in the c:\workshop folder. And since I did the restore from safe mode it didn't create a roll-back restore point either. So I'd like to add certain folders if possible, rather than move my stuff elsewhere altogether.

I faintly remember reading about such thing being possible through command line in windows 7, along with changing the default backup location and other things, but can't find anything now or specifically for Windows 8.

In Windows Vista, 7, 8 and 8.1, My Documents is included (update: in Windows 10, System Protection is turned off by default for C:). In theory, System Restore does not affect documents, but unfortunately Microsoft's definition of 'document' is only those files whose extension is not included in their list of Monitored File Name Extensions. This list includes things like JavaScript .js, ActionScript .as, C# .cs, .INF, .INI, .1ST, .HLP - in total 574, including many that are used by various applications to save users' work.
Personally, I think Microsoft have got it wrong with this functionality, and should trim the list of extensions. The best solution for now is to have your work files on a disk where System Protection is not enabled (e.g. either disabling it on C:, or storing your files on D:). Failing that, providing you haven't added files to FilesNotToSnapshot, after performing System Restore you can resurrect reverted or deleted work with Shadow Explorer, either as individual files or as a whole directory tree like C:\workshop.