Why Enumerate Objects activity of UiPath.FTP.Activities package fails if the path of the directory on the FTP server contains space.
Issue Description
When using the Enumerate Objects activity, if the RemotePath contains a directory with a space, it results in an error.
"Enumerate Objects: One or more errors occurred. (Invalid number of arguments MLSD /MainDirectory/First SecondSubDirectory/Final SubDirectory)"
Root Cause
Some FTP servers cannot handle the MLSD command with a path that contains spaces. This issue may be related to the FTP server's implementation. According to the RFC, the MLSD command should accept a path string ending with a CRLF and should be able to handle spaces if it adheres to the RFC precisely.
The unquoted path is handled as two parameters instead of one.
Resolution
To resolve this issue, rename the FTP path by removing the space. Once the space is removed from the path, the Enumerate Objects activity should work as expected.
- Identify the directory in the RemotePath that contains spaces.
- Rename the directory to remove any spaces.
- Update the RemotePath in the Enumerate Objects activity to reflect the new path without spaces.
- Retry the Enumerate Objects activity to confirm that the issue is resolved.
By following these steps, errors caused by spaces in the RemotePath can be avoided when using the Enumerate Objects activity with certain FTP servers.