Inputs: A directory path name, a boolean flag indicating if subdirectories will be searched, and an optional search pattern
Minimum ITScripts engine version required: 22.214.171.124
Modifies the target machine: No
Name: Get List of Files in a Directory
Outputs: The script will output results of the scan to a CSV file. The file will contain the following information:
- Machine name
- File name
- Directory name
- File size
- File type
- Date modified
Purpose: This script retrieves the list of files contained in a directory.
Script Version: 126.96.36.199
Target Type: Any
The following input is required:
- A directory path to search
- A boolean flag indicating if subdirectories will be searched
The following input is optional:
- A pattern to compare the name against (wildcarding). For example, *.doc
Possible Operations Monitor results include:
"WMI connection to the target machine failed. Access is denied."
"WMI connection to the target machine failed. The machine may be offline or firewalled."
"Parameter "directoryPath" must be a valid string."
"Parameter "includeSubFolders" must be a Boolean value set to "$true" or "$false"."