There is a limit for the entire length of the filepath.
259 chars is the maximum length for the entire filepath in the NTFS filesystem.
We had already this discussion here in the forum some time ago.
Repeatingly some users stumble over this hurdle on filename creation.
As a workaround do not put the result into the filename directly but put the result into a temporary tag field, which you can check by your eyes if the filepath would have been formatted well sized.
Afterwards the last step is setting the %_filename% directly with the value from the temporary tag field.
Read forum threads ...
what is maximum number of characters allowed in filename?
NTFS path/file length exceeded
DD.20120206.2209.CET