What is "Temporary Files" under source tab of job --> exclude

I’m trying to determine what “temporary files” exclusion setting does there.

I also noticed that this set the option

--exclude-files-attributes="temporary"

In looking through the code, I think this means “Duplicati temporary files”, but I couldn’t find clear evidence of that–at least based on my experience.

–Dave

To be honest, I’m not sure myself what all is excluded with that and the other options for that parm.

I’ve been meaning to look at the code, and hoping it’s something that’s documented. :slight_smile:

According to the source :

               new CommandLineArgument("exclude-files-attributes", CommandLineArgument.ArgumentType.String, Strings.Options.ExcludefilesattributesShort, Strings.Options.ExcludefilesattributesLong(Enum.GetNames(typeof(System.IO.FileAttributes)))), 

So, it’s looking for a file attribute ‘temporary’. That doesn’t appear to be something you can manually set on a regular file, but can be programatically set by issuing a GetTempFileName windows function.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa363875(v=vs.85).aspx

Long story short: It’s excluding files which an application has created and requested to be ‘temporary’ - One imagines all of those will live in your (default) \Windows\Temp folder.

1 Like

Hi Steve,

I really appreciate your response. Very interesting. It never occured to me that files could have a hidden attribute that noted it was a temporary file.
Now if only I understood why the following file was tagged as temporary:
C:\Program Files\Google\Update\GoogleUpdate.exe

For those that are intersted, here are a few links I found that help locate those such files, and/or clean them up:
Powershell to query:
https://social.technet.microsoft.com/Forums/windowsserver/en-US/a909a693-362e-47b1-a0d4-2b111e2440be/how-is-temporary-attribute-getting-set?forum=winservergen

Interesting Powershell command from above link was:
Get-childitem C:\ -recurse -force | where {$_.attributes -match "temporary"} | Export-Csv tempfiles.csv

A GUI that may be interesting:
http://www.nirsoft.net/utils/bulk_file_changer.html

Removing temp file attribute:
https://community.spiceworks.com/scripts/show/1102-remove-temp-file-attribute

Ahhh, Nirsoft - makers of quality tools for over a decade. :smiley:

Thanks for the additional info!

Note that I edited your post to turn the code sample into code formatting (surrounded it with left-ticks) and the URLs into actual links (to make using them easier and allow usage logging).

1 Like

Thank you for fixing my post formatting.