Can't Download FTP File
Closed this issue · 3 comments
Sorry I'm not sure if I'm doing something wrong but I'm getting this error when I try to download a file
Receive-FTPFile : Cannot process argument transformation on parameter 'RemoteFile'. Cannot convert the "/scdeploy/cnr.msi" value of type "System.String" to type
"FluentFTP.FtpListItem[]"
how are you using it?
I was putting /scdeploy/cnr.msi directly into the -remotefile flag. Apparently that doesn't work?
Using the examples on that website I was able to use the variable to search the directory for the filename cnr.msi and the plug that into the -remotefile instead which worked. So I have what I need. not sure why the direct ftp filepath doesn't work though.
There are two parameter sets. One for the native object type is [FluentFTP.FtpListItem]
with parameter RemoteFile
which allows you to download files using the way you just did.
Alternatively, you can use RemotePath
which downloads the file based on a string. Maybe this could be improved in future with internal object type detection. Something for future updates.