I have hundreds of text clippings which have as their default name, the first paragraph of the clip. No problem until I try to use Carbon Copy Cloner to back them up to my Synology NAS. The file name is too long to be accepted, and the file fails to copy.
I could easily truncate their names in the finder, but then that breaks DevonThink, so I’d like to see a script that will do a simple truncate of the file name, say to 50 characters (or some rational amount).
Finding hundreds of these things by hand inside DT just isn’t realistic.
For those interested in some AppleScript, here is a teaching edition snippet…
property maxLength : 16
tell application id "DNtp"
repeat with thisRecord in (selection as list)
set currentName to (name of thisRecord)
if (count characters of currentName) > maxLength then
set truncatedName to (characters 1 thru maxLength of currentName) as string
set name of thisRecord to truncatedName
end if
end repeat
end tell
Hey there, is ist possible to detect long filenames with a smart rule or smart folder to fix them with this script? I´ve got the same Problem with hundreds of files causing errors on backup from mac to nas.