Files and Folders Scanner

The Files and Folders Scanner allows IT administrators to scan for the existence of files, folders, and subfolders on a PDQ Connect managed device. 

Configuring a Files and Folders Scanner

To create a Files and folders scanner, click the "More" button on the left navigation menu and then click "Custom scanners" from the dropdown. From the resulting Scanners page, click "Create scanner" and then select "Files and folders" as the type. Below is an overview of how to configure each option. 

Name: The name of the scanner. This can be seen as a column on the Files and folders tab of a device, useful to identify which scanner was used to locate a specific file or folder. 

Type: Select "Files and folders" to specify the current scanner as a Files and folders. 

Path: The parent folder where the file or target folder is located. Multiple paths may be entered by adding each path on a new line. 

Search subfolders: Select this option to recursively search all subfolders and files below the specified path(s). 

Scope: Defines the type of object that will be returned by the scanner. Selecting "Folder" will only return folders, while "file" will only return files. If the "Search subfolders" option is selected, items of the matching scope will be returned recursively. Otherwise, only child items in the immediate path will be returned. It is possible to select both Folder and File as the Scope options at once. 

Match Type: Used to specify criteria that must be met in order for a file or folder to be returned by a scan. By default, the match type is set to "All" and will return all results found within the selected scope. 

String values entered for the Match type only apply to the child files or folders under the specified path, not the path itself. 

Viewing Files and Folders Results

The findings of all Files and folders scanners can collectively be viewed by clicking on a device and selecting the "Files and folders" tab. Note that if you have never created a Files and folders scanner or no results have been found by an existing scanner, the page will display "No rows." 

Each column header on the Files and folders tab corresponds to a distinct element in relation to the target. 

  • Object type: Specifies if the object is a file or a folder.
  • Path: The parent directory where the file or folder exists.
  • Name: The name of the file or child folder, defined by object type. 
  • File format: Lists the file extension. The File format field does not apply to folders, nor does it apply to files without an extension. For these items, the File format field will display an empty value.  
  • Size: Lists the size of the target item in Kilobytes, Megabytes, or Gigabytes. 
  • Scanner: The name of the Files and folders scanner that PDQ Connect used to locate the file or folder. 
  • Created: The creation date and time of the file or folder. 
  • Modified: The last modified date and time of the file or folder. 

Scan for a File

To scan for the existence of a specific file:

  1. Enter full directory where the file exists excluding the name of the file. 
  2. Select "File" as the scope.
  3. Select "Contains" or "Equals" for the Match type.
  4. Enter the name of the file. 
  5. Hit Save

Example: 

The illustration to the right displays how to configure a file scanner to search for the existence of an executable file named Deploy_19.3.520.0.exe. Note that the name of the file is not included in the Path. Instead, it is specified as a string value in the Scope with File selected as the type.

File Name: Deploy_19.3.520.0.exe

File Path: C:\PDQ\Deploy\Installer

When the scanner is saved, PDQ Connect will beginning scanning systems for the existence of the file. For any machine where the file is found, the results will be recorded in the device details tab of that device under the Files and folders tab as shown below. 

You can enter file names with or without extensions in the string field. However, if you include the extension, only files that match both the name and the extension will be returned.

Scan for a Folder

To scan for the existence of a specific folder:

  1. Enter the parent directory where the target folder exists, excluding the name of child folder. 
  2. Select "Folder" as the scope.
  3. Select "Contains" or "Equals" for the Match type.
  4. Enter the name of the target folder to search for. 
  5. Hit Save

Example: 

The illustration to the right displays how to configure a folder scanner to search for the existence of a folder named Installer located in the directory C:\PDQ\Deploy. Note that the name of the folder is not included in the Path. Instead, it is specified as a string value in the Scope with Folder selected as the type.

Folder Name: Installer

Folder Path: C:\PDQ\Deploy

When the scanner is saved, PDQ Connect will beginning scanning systems for the existence of the folder.

For any machine where the folder is found, the results will be recorded in the device details tab of that device under the Files and folders tab as shown below. 

FAQ

The following are some commonly asked questions when working with the Files and folders scanner.

Question: Can I create Groups and Filter devices based on the results of a Files and folders scan? 

  • Answer: Yes. "Files and Folders" may be selected as the data source when creating a group or filter. Available items that can be filtered on are Object type, Path, Name, File format, Size, Scanner, Created, and Modified. See Creating Groups from Custom Scans for more information. 

Question: Can I create reports based on the results of a Files and folders scan? 

  • Answer: Yes, the same items available for use in a filter can be used in a report. Select "Files and folders" as the source column and then select the desired columns. 

Question: Can I use Environment Variables in a folder path? 

  • Environment variables are not currently supported in the Files and Folders scanner. In most cases, attempting to use a variable such as $env:appdata or %appdata% will cause the scan to return no results. 

Question: Can I use wildcards in a folder path? 

  • Wildcards such as an asterisk will mostly work in the file scanner but are not officially supported. If used, the scan may produce unexpected results or unhandled edge cases. 

 

Still have a question or want to share what you have learned? Visit our Community Discord to get help and collaborate with others.