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
Post date
Thursday, July 9, 2015 - 13:06
Last modified
Friday, July 20, 2018 - 09:59
Downloads
Attachment | Size |
---|---|
![]() | 392 bytes |
Comments
rlagger
2018-10-04
10:31:23
Length function
When using this query with sql server change the Length() function to Len().