Find long file names in eDirectory
Find long file names in eDirectory
Details
A customer asked for a query to find filenames that are too long, and might cause issues when migrating files from eDirectory to AD. The customer requested that query find filenames longer than 128 characters. The filename length to be reported by changing line 12, and the scope can limited by adding sd.scan_target = '\\server\share' to the where clause.
Note: If you have downloaded an older version of the is query and have moved to version 3.5 of the product, the old active_fs_scandata views have been replaced with current_fs_scandata.
Code
SELECT sd.fullpath, Length(sd.fullpath) AS fullpath_length, sd.name, Length(sd.name) AS filename_length, sd.size, srs.byte_string(CAST(sd.size AS BIGINT)) AS size_string, sd.scan_target FROM srs.current_fs_scandata_edir AS sd WHERE (Length(sd.name) > 128) AND (sd.path_type = 1) ORDER BY filename_length DESC
SELECT sd.fullpath, Len(sd.fullpath) AS fullpath_length, sd.name, Len(sd.name) AS filename_length, sd.size, srs.byte_string(CAST(sd.size AS BIGINT)) AS size_string, sd.scan_target FROM srs.current_fs_scandata AS sd WHERE (Len(sd.name) > 128) AND (sd.path_type = 1) ORDER BY filename_length DESC
Post date
Thursday, July 9, 2015 - 13:06
Last modified
Wednesday, August 21, 2024 - 11:35
Downloads
Attachment | Size |
---|---|
file and path lengths.zip | 787 bytes |