Issue with using -filemask to exclude sub-directories
If executing WinSCP via SAP, you can get around the 255-character limitation mentioned above by using SAP function module SXPG_COMMAND_EXECUTE_LONG instead of SXPG_COMMAND_EXECUTE. If you use the "LONG" version, you can pass your commands to the long_params parameter (1024 character max) instead of the additional_parameters parameter (255 character max).
We're in the process of implementing an SFTP transmission for a client whose very long output file names would cause the combined commands to exceed 255 characters. In trying to resolve this issue, I found the SXPG_COMMAND_EXECUTE_LONG function module and have replaced a call to SXPG_COMMAND_EXECUTE with a call to its "LONG" equivalent.
We're in the process of implementing an SFTP transmission for a client whose very long output file names would cause the combined commands to exceed 255 characters. In trying to resolve this issue, I found the SXPG_COMMAND_EXECUTE_LONG function module and have replaced a call to SXPG_COMMAND_EXECUTE with a call to its "LONG" equivalent.