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 
 
 

Comments

When using this query with sql server change the Length() function to Len().

Author
rlagger
Last modified
Friday, July 20, 2018 - 09:59
Properties
Minimum Version
Report Category
Includes a Report Layout
No
Databases
Tags
Rating
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Downloads
AttachmentSize
file and path lengths.zip392 bytes