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 
Author
rlagger
Last modified
Wednesday, August 21, 2024 - 11:35
Properties
Supported Version
Report Category
Includes a Report Layout
No
Tags
Downloads
AttachmentSize
file and path lengths.zip787 bytes