I’m using the WaitForDownload activity to download a file, the ‘file’ is then copied to a variable and if I try to move it, I get an error that “System.IO.FileInfo” cannot be converted to String
So what I did was add an assign activity to convert the variable to a string:
strDownloadedFileasString > strDownloadedFile2.Name
But when I try to move the file, I get the following error:
Source: Move File
Message: Could not find file ‘C:\Documents\UiPath\RPA_Test\DownloadedDriver.csv’.
Exception Type: System.IO.FileNotFoundException
RemoteException wrapping System.IO.FileNotFoundException: Could not find file ‘C:\Documents\UiPath\RPA_Test\DownloadedDriver.csv’.
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
Any ideas guys? Even if i ‘move’ it to the same location, I get the same error. Basically if i don’t convert to String, it says I cannot move the downloaded file and if i convert it to string, it says it cannot find the downloaded file
Thank you guys, if I use Path Exists it confirms that the file doesen’t exist…except it does. I can see it and it does successfully download.
But I’m unable to do anything with it because the variable is not a string.
With regards to the variable of the downloaded file, this is indeed set to System.IO.FileInfo