--- title: "Using Selectors to Include and Exclude files-Windows - Step-by-Step Guide" slug: "using-selectors-to-include-and-exclude-files-windows-step-by-step-guide" updated: 2026-11-24T18:08:38Z published: 2026-11-24T18:08:38Z canonical: "docs.retrospect.com/using-selectors-to-include-and-exclude-files-windows-step-by-step-guide" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.retrospect.com/llms.txt > Use this file to discover all available pages before exploring further. # Using Selectors to Include and Exclude files-Windows - Step-by-Step Guide ## **Creating and Using Selectors in Retrospect** This document explains how to create, test, and use Retrospect selectors to include or exclude specific files and folders (for example, music, games, or office documents) in your backups. It also covers how to safely verify selector behavior and how to use more advanced AND conditions. #### **Step 1: Open the Selectors Configuration** Start by opening the Selectors area in Retrospect. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-cbgu8sp8.jpg) 1. In Retrospect, go to ****Configure**** on the left side. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-qe37honm.jpg) 1. In the Configure section, choose ****Selectors****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-8fzgnnep.jpg) 1. Click ****New**** to create a new selector. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-a573m890.jpg) 1. Enter a name such as ****No Music or Games****, then click ****OK****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-hyyear8h.jpg) #### **Step 2: Define Exclusion Rules for Music and Games** Configure the selector to exclude MP3 files and folders that contain “Games” in the name. 1. In the selector editor, you will see two sections: - ****Include**** (Include everything) - ****Exclude**** (Exclude nothing by default) To exclude items, work in the ****Exclude**** section. 2. In the ****Exclude**** section, choose ****Name**** > ****File**** from the criteria list on the left. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-fe2vqthl.jpg) 1. Make sure ****Folder**** is unchecked so the rule applies only to files. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-4ac60a7s.jpg) 1. Set the condition to ****Does****: ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-3kc1hcbl.jpg) 1. Choose ****End With**** and enter .mp3 as the file name pattern. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-d89eg319.jpg) This will exclude files whose names end with .mp3. 1. Next, add an ****Or**** condition to also exclude game folders. Click the ****+**** next to ****Or****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-7qbs5vwv.jpg) 1. In the new condition, choose ****Folder Name****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-mxqcjygb.jpg) 1. Set the condition to ****Does Contain****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-5o21kjvs.jpg) 1. Enter Games as the text to match. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-ki3g9ssp.jpg) 1. Click ****OK**** to save the selector rules. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-7usv5fau.jpg) This selector now: - Includes everything by default. - Excludes: - Files whose names end with .mp3. - Files and folders whose names contain Games. 1. Close the selector editor window. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-ejgoqs8n.jpg) 1. Click ****Save**** to save your selector changes. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-eypvus7w.jpg) #### **Step 3: Apply the Selector to a Backup Operation** Use the new selector when running a backup. 1. Go to the ****Backup**** section in Retrospect. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-lzuckv6l.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-1ffisi2t.jpg) 1. Under ****Selecting****, change the current selector to your custom selector ****No Music or Games****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-2d54mawd.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-ueh39hsh.jpg) When this backup runs, Retrospect will include all data except items that match the exclusion criteria (MP3 files and items with “Games” in the name). #### **Step 4: Check a Selector Against Your Hard Drive** Verify what your selector will include and exclude before using it in production. 1. Go back to ****Configure**** > ****Selectors****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-uikj8bx6.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-fidax0zt.jpg) 1. Choose your custom selector and click ****Edit****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-bzmb6e5v.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-i6cef3fr.jpg) 1. At the top of the selector editor, click the ****blue check mark**** icon to run ****Check Selector****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-2b1xs7u0.jpg) 1. Select the hard drive (for example, your main system drive) to test against. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-2tp1pr77.jpg) 1. Click ****OK**** to start the scan. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-4x2o3mg3.jpg) Retrospect will: - Scan the selected drive. - Apply the selector. - Display a browser window listing all files and folders in the source volume: - ****Highlighted items**** are ****included**** in the backup. - ****Non-highlighted items**** are ****excluded**** (for example, empty folders or .mp3 files excluded by your selector). Use selectors sparingly: - It is easy to accidentally exclude data you might need later. - Avoid complex or overly broad criteria unless absolutely necessary. #### **Step 5: Use the Selector in a Backup Script** Attach the selector to a scripted backup for ongoing use. 1. Close the ****Check Selector**** window. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-usvm1ov1.jpg) 1. Close the selector editor. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-wjuwuymu.jpg) 1. Go to ****Configure**** > ****Scripts****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-d4jbd4hc.jpg) 1. Create a new backup script or edit an existing one. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-a4agibw7.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-xa0i1tdh.jpg) 1. Choose your ****source**** (for example, your local C: drive and/or network clients). ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-xxnfk3cc.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-okkgl3dm.jpg) 1. Choose your ****destination**** backup set. 2. Under ****Selecting****, change the setting from ****All Files**** to your custom selector. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-w4evdg2s.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-qvnyuryc.jpg) Now, when this script runs, it will include everything except the items defined in your selector. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-pve65a75.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-bw568791.jpg) #### **Step 6: Create an Include-Only Selector for Office Files** Next, create a selector that ****only includes**** certain file types and folders (e.g., Office documents) and excludes everything else by omission. 1. Close the script window you just created or edited. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-mmrpdmhn.jpg) 1. Return to ****Configure**** > ****Selectors****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-bqz2rvc4.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-n6jqeypa.jpg) 1. In Selectors, click ****New****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-8vsnbkza.jpg) 1. Name this selector, for example, ****Office files****, then confirm. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-yzqy6g0h.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-434ozdp8.jpg) 1. In the ****Include**** section, click the ****+**** button to add your first include rule. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-tl6hs2di.jpg) 1. Set the criteria: - ****File name**** - Condition: ****Does End With**** - Value: .doc ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-0b04xb6i.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-ndyl0hrc.jpg) 1. Next to ****Or****, click ****+**** to add another include rule. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-xjiws48b.jpg) 1. Set this rule to: - ****File name**** - Condition: ****Does End With**** - Value: .xls ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-hn6v47kd.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-s1tlb2jm.jpg) 1. Click the ****+**** next to ****Or**** again to add one more file-type rule. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-80e10ba8.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-m6wcg0st.jpg) 1. In this rule, uncheck ****Folder**** so it applies only to files. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-qvmsk6qe.jpg) 1. Set it to: - Condition: ****Does End With**** - Value: .pdf ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-ve3wg336.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-hx9y5yiq.jpg) 1. Add one more criterion for folders: - Click ****+**** to add a new rule. - Choose ****Folder****. - Set ****Folder name**** to ****Does Contain****. - Enter Documents. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-wb3v6p89.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-w6aulrdl.jpg) With this selector: - It will ****include****: - Files whose names end with .doc. - Files whose names end with .xls. - Files whose names end with .pdf. - Any folder whose name contains the word Documents. - It will ****exclude nothing explicitly****in the Exclude section, but: - Only items that match these Include criteria will be backed up. - Everything else will effectively be left out of the backup. When this selector is used in a backup script, only items meeting these criteria are included. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-w6myj50y.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-28ziumxr.jpg) #### **Step 7: Verify the Office Files Selector** Test the Office files selector to confirm it includes only the intended items. 1. Click the ****Check Selector**** button (blue check mark) while the Office files selector is open. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-fc18jcqi.jpg) 1. Select your C: drive (or another source) and start the scan. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-xmv3x6gg.jpg) Retrospect will: - Scan the drive. - Apply the include criteria. - Display only the files and folders that match the include rules (e.g., .doc, .xls, .pdf, and folders containing “Documents”). To improve selector reliability: - Keep selectors as simple as possible. - Avoid using ****Path**** criteria when you can; paths can change and easily cause incorrect includes/excludes. - For very specific names, consider using ****Matches**** or ****Exactly Matches**** instead of ****Contains**** or ****Ends With****. #### **Step 8: Create an AND-Based Selector for Accounting Documents** Use an ****AND**** condition so that ****all**** criteria must be true for a file to be included. 1. Create another new selector. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-nd2a7wcs.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-75ofb9qy.jpg) 1. Name it ****Accounting Documents****. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-u0b53nv3.jpg) 1. In the ****Include****section, add the first rule: - Choose ****Folder name****. - Set the condition to ****Does Match**** (or ****Exactly Matches****, depending on the interface). - Enter Accounting. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-ecqsgxxy.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-pxvpf9za.jpg) 1. Click the ****top**** ****+**** button (not the one next to Or). This creates an ****AND**** condition, meaning all listed conditions must be true. ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-5l5vgvwa.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-0g1mojl3.jpg) 1. Add the second rule: - ****File name**** - Condition: ****Does End With**** - Value: .doc ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-paijempy.jpg) ![](https://cdn.us.document360.io/6d1fe0c6-ccdb-4ee9-a621-0504cb91b4be/Images/Documentation/using-selectors-to-include-and-exclude-files-windows---step-by-step-guide-image-7ua1v22u.jpg) This selector will only include: - Word documents (.doc) - That are located in a folder whose name exactly matches ****Accounting****. Both conditions must be met: - The folder name must be Accounting. - The file name must end in .doc. This demonstrates how AND conditions can precisely target data for inclusion or exclusion in your backups.