How is UiPath.FTP.Activities.Download Files used?

Hello everyone, I am new to automation with UiPath … please I need help with this activity

I managed to connect to the remote repository with WithFtpSession.
I used DirectoryExists to check the remote directory and it found it, but when I try to download the file to my local repository, it shows the following message.

RemoteException wrapping System.AggregateException: One or more errors occurred. —> RemoteException wrapping FluentFTP.FtpCommandException: No data sets found.

Server stack trace:
at FluentFTP.FtpClient.OpenPassiveDataStream(FtpDataConnectionType type, String command, Int64 restart)
at FluentFTP.FtpClient.OpenDataStream(String command, Int64 restart)
at FluentFTP.FtpClient.GetListing(String path, FtpListOption options)
at FluentFTP.FtpClient.GetObjectInfo(String path, Boolean dateModified)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object args, Object server, Object& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at FluentFTP.FtpClient.AsyncGetObjectInfo.EndInvoke(IAsyncResult result)
at FluentFTP.FtpClient.b__343_1(IAsyncResult ar)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at FluentFTP.FtpClient.d__343.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.FTP.FtpSession.d__25.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.FTP.Activities.DownloadFiles.d__20.MoveNext()
— End of inner exception stack trace —
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

This is my DownloadFiles:

What can I do to solve this problem?

Hi @Zais,
It looks to me like a possible connection issue to the FTP. Are you able to check that with the newest FTP activities package?

Hi Pawel, I think that if your hypothesis was true, then the error message would be “RemoteException wrapping FluentFTP.FtpCommandException: PASS command failed”

I too am having trouble getting FTP to work with mainframe. No one seems to be able to provide valid help.

I know that this is not a perfect solution but if the newest FTP package can’t help you may try to invoke a powershell script. Of course, it depends on what you need to do with this FTP connection.