# Filters: excluding Win office temp files

**URL:** https://forum.duplicati.com/t/filters-excluding-win-office-temp-files/5964
**Category:** Support
**Created:** [January 10, 2019, 5:32pm UTC](https://forum.duplicati.com/t/filters-excluding-win-office-temp-files/5964 "2019-01-10T17:32:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![duplicati\_user](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/d/db5fbb/32.png) [@duplicati\_user](https://forum.duplicati.com/u/duplicati_user)
#### Post date: [January 10, 2019, 5:32pm UTC](https://forum.duplicati.com/t/filters-excluding-win-office-temp-files/5964/1 "2019-01-10T17:32:40Z")

</div>

Hi everyone,

first off, let me say that Duplicati works great and I am really glad for your work! There is one thing, though, that keeps annoying me and thatI just can’t seem to solve:

Whenever one opens a Microsoft Office file (e.g. Word), the program will create a temporary file with the following name: ~$[ACTUAL FILE NAME].[EXTENSION, E.G. DOCX]. Those temp files remain on the hard disk as long as the corresponding file is opened. Since I frequently leave a bunch of office documents opened for extended periods of time, Duplicati will always try to backup the automatically created temp files (which it can’t, since they are locked by the corresponding program) and produce an error message.

Could anyone help me out with a filter rule that will exclude suche files?

Thanks very much in advance for your help!

Cheers,  
a happy Duplicati user

---

<div class="post-metadata">

### Author: ![duplicati\_user](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/d/db5fbb/32.png) [@duplicati\_user](https://forum.duplicati.com/u/duplicati_user)
#### Post date: [January 17, 2019, 8:50am UTC](https://forum.duplicati.com/t/filters-excluding-win-office-temp-files/5964/2 "2019-01-17T08:50:00Z")

</div>

Has really noone encountered this problem before? I tried some more filter settings but still get error messages of this kind:

Warning-Duplicati.Library.Main.Operation.Backup.FileBlockProcessor.FileEntry-PathProcessingFailed]: Failed to process path: ~$file.xlsx

I only get this kind of warning for such temporary files. Additionally, I tried to specifically exclude this file (Filter: -~$file.xlsx) or to exclude all files of this type (Filter: -~\*.xlsx). Neither of those fix the problem.

I am thankful for any suggestions.

---

<div class="post-metadata">

### Author: ![kees-z](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kees-z/32/29_2.png) [@kees-z](https://forum.duplicati.com/u/kees-z)
#### Post date: [January 17, 2019, 10:11am UTC](https://forum.duplicati.com/t/filters-excluding-win-office-temp-files/5964/3 "2019-01-17T10:11:15Z")

</div>

You can use Regex to exclude temporary Office files:

> [@Excluding MS Office temporary files?](https://forum.duplicati.com/t/excluding-ms-office-temporary-files/242/2):
>
> Try using this regular expression: -[.\*\\\~$[^\\]\*]

Or run Duplicati with administrative privileges and use option [–snapshot-policy=required](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#snapshot-policy) to create a snapshot before the backuperation is started.
