File-Based Discovery creates only one Unidentified File Set record for files with the same name and size<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } .kb-wrapper { font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; max-width: 100%; } .kb-wrapper h2 { font-size: 14pt; font-weight: 900; color: #032D42; border-bottom: 2px solid #e8fce4; padding-bottom: 4px; margin-top: 24px; margin-bottom: 10px; } .kb-wrapper p { margin: 0 0 10px 0; } .kb-wrapper ul { margin: 0 0 10px 0; padding-left: 24px; } .kb-wrapper ul li { margin-bottom: 4px; } .kb-wrapper ol.steps { list-style: none; counter-reset: step-counter; padding-left: 0; margin: 0 0 10px 0; } .kb-wrapper ol.steps > li { counter-increment: step-counter; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; } .kb-wrapper ol.steps > li::before { content: counter(step-counter); display: flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; background-color: #032D42; color: #63DF4E; font-weight: 900; font-size: 11pt; border-radius: 50%; flex-shrink: 0; margin-top: 2px; } .kb-wrapper ol.steps > li .step-content { flex: 1; } .kb-wrapper .callout-note { border-left: 4px solid #52B8FF; background: #e6f4ff; padding: 10px 14px; margin: 10px 0; font-size: 12pt; } .kb-wrapper .callout-warning { border-left: 4px solid #e6a817; background: #fff4e0; padding: 10px 14px; margin: 10px 0; font-size: 12pt; } .kb-wrapper table { width: 100%; border-collapse: collapse; margin: 10px 0 16px 0; font-size: 12pt; } .kb-wrapper table th { background-color: #032D42; color: #ffffff; padding: 8px 10px; text-align: left; font-weight: 700; } .kb-wrapper table td { padding: 7px 10px; border-bottom: 1px solid #d0dde3; } .kb-wrapper table tr:nth-child(even) td { background-color: #e8fce4; } .kb-wrapper code { font-family: 'Courier New', monospace; font-size: 10.5pt; background: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; padding: 1px 5px; border-radius: 3px; } .kb-wrapper .related-links-list { list-style: none; padding-left: 0; margin: 0 0 10px 0; } .kb-wrapper .related-links-list li { margin-bottom: 8px; } .kb-wrapper .link-disclaimer { font-size: 10pt; font-style: italic; margin: 2px 0 8px 0; color: #333; } .kb-wrapper a { color: #032D42; } Issue File-Based Discovery (FBD) creates only one Unidentified File Set record when multiple files share the same name and size but contain different content — for example, multiple version.txt files installed in different directories on the same host. Symptoms Multiple files with the same name and size exist in different directories on a Windows host.FBD discovers all files but only one Unidentified File Set record is created on the instance.The Version field on the Unidentified File Set record is empty for .txt files.The contents of the files differ (for example, one contains 01_2025, another contains 04_2025), but this is not reflected anywhere in the discovered data. Facts FBD collects three attributes per discovered file: Name, Size, and Version.Version is Windows-only. It is extracted from the embedded VERSIONINFO resource metadata present in Windows PE binary file types (.exe, .dll). Plain text files (.txt) do not carry this metadata, so the Version field is always empty for them.FBD does not read or parse the contents of any file. There is no mechanism to extract a version string from inside a .txt file or any other plain text format.A business rule on the Unidentified File Set table computes a SHA256 hash on insert and update using the following concatenation: file_name + '.' + file_version (if not nil) + '.' + file_size. When version is empty, the resulting hash input is file_name..file_size (double-dot separator).A second business rule prevents insertion of any record whose computed hash matches an existing record, enforcing deduplication at the table level.Because two version.txt files on the same host share the same Name, the same Size, and both have an empty Version field, their hashes are identical. Only one Unidentified File Set record is created.File path is not an input to the hash. Two files with identical Name, Size, and Version always produce the same hash regardless of directory location. Release All Releases Cause The Unidentified File Set deduplication business rule is working as designed. The hash is computed from Name, Version, and Size only — file path and file contents are intentionally excluded. For plain text files, Version is always empty because FBD's version extraction relies exclusively on Windows PE VERSIONINFO metadata, which .txt files do not have. With path excluded and version absent, two files that differ only in location and internal content are indistinguishable to FBD and are treated as the same file. Resolution Because FBD has no mechanism to differentiate files with identical Name, Size, and Version values, the alternatives below involve changes outside of FBD itself. ServiceNow does not provide guidance on implementing or troubleshooting these changes. Option A — Embed version in the filename Rename the files to include the version in the filename itself — for example, version-01_2025.txt and version-04_2025.txt. This produces distinct Name values, which results in distinct SHA256 hashes and therefore a separate Unidentified File Set record for each file. The version is identifiable from the Name field on the record. Note: FBD will not automatically populate the Version field using this approach — it will remain empty for .txt files regardless of filename changes. If the Version field must be populated, an administrator would need to do so manually after discovery. Option B — Use a resource-only DLL Create a resource-only DLL using Visual Studio that embeds a VERSIONINFO resource containing the desired version string. Windows PE binaries carry this metadata natively, and FBD's VersionResolver will extract it and populate the Version field on the resulting Unidentified File Set record. Files with different version strings produce distinct hashes, resulting in separate records. This approach requires a compiled artifact to be maintained and deployed per version, and the DLL filename must be present in the SAM file whitelist to be collected under the SAM flow. See the Microsoft documentation links in the Related Links section for reference on creating resource-only DLLs and the VERSIONINFO resource structure. Related Links File-Based DiscoveryCreating a Resource-Only DLL (Microsoft) This link points to external content maintained by a third party. ServiceNow is not responsible for the accuracy or availability of content on external sites. VERSIONINFO Resource (Microsoft) This link points to external content maintained by a third party. ServiceNow is not responsible for the accuracy or availability of content on external sites.