I tried the following script
option batch continue option reconnecttime 15 option confirm off open sftp://XXX@XXX synchronize remote -delete z:\ /XXX close exit
it stops if a long file name (>255 char) is met.
This error does not occur if the command run in the GUI.
I think this is a bug.
Could you please help me?