Windows File History / Backup – exclude folder by name

backupfile-historywindows 10

In Windows 10 "File History" / Backup (whatever it's called now), is there a way to exclude folders by name? For example, I'd like to exclude all folders named 'bin' from being backed up. Essentially, it would be great to be able to exclude things from file backup like you can do for git using a .gitignore file. Any ideas/suggestions on how to do this?

Best Answer

  • For anyone who stumbles upon this old post trying to find an alternative to the gui and having to pick exclusions one by one, in the File History configuration folder:

    C:\Users\You\AppData\Local\Microsoft\Windows\FileHistory\Configuration
    

    there are two files:

    Config1.xml and Config2.xml
    

    You can manually enter xml for all the folders you want to exclude like this:

      <FolderExclude>C:\Project\FullPathToFolder\bin</FolderExclude>
    

    All the other includes are fully qualified paths and I am not sure if there is a way to provide a true wildcard but you could script the tags into a listing using a cmd prompt to pick all bin (and/or obj) folders like so

    C:\Project>dir bin /B /S
    

    paste them into Excel and fill down this terribly complicated macro to produce the xml without scripting anything:

    ="<FolderExclude>" & A1 & "</FolderExclude>"