Article ID: kb00109Last Modified: 22-Aug-2024

Situation

File-level backup plans are by default configured with an option to skip files with the attributes “S” (system) and “H” (hidden) if the appropriate filtering option is enabled, as seen below:

When such a plan finishes, if its source contained files with such attributes, you will see a corresponding message in your email report and plan results, as seen in the examples below:

System and hidden files skipped: X (where “X” is a number of the excluded files)

If you need to check which exact files and folders were skipped, consider investigating the backup source directory(ies) using the solution described below.

Solution

In order to get a list of the files that have system and hidden attributes, launch the Windows PowerShell console under administrator privileges and run the following script (note the customizable bold parts):

Get-ChildItem FolderWithSystemFiles -Recurse -Force -ErrorAction SilentlyContinue | Where-Object {$_.Attributes -match "Hidden" -or $_.Attributes -match "System"} | Select FullName | Export-CSV ReportLocation

As a result, a list will be created containing all the files and sub-folders with hidden and system attributes located in the directory specified as the “FolderWithSystemFiles”.

The list will be saved as a CSV file in the directory specified as the “ReportLocation”. Refer to the example below for more detail on the script structure:

Get-ChildItem C:\Test -Recurse -Force -ErrorAction SilentlyContinue | Where-Object {$_.Attributes -match "Hidden" -or $_.Attributes -match "System"} | Select FullName | Export-CSV C:\Results\List.csv

The example script above will create a CSV report named “List.csv”, which will be saved in the folder “C:\Results” and contain a list of all the hidden and system files and sub-folders found in the “C:\Test” directory.

The CSV files can be opened with most text editing tools and spreadsheet processors.

https://git.cloudberrylab.com/egor.m/doc-help-kb.git