Re: Problem with moving files from remote folder to local folder
Your logic seems strange. Why are you downloading the files twice? That's a waste of time, bandwidth and your server resources.
Anyway, what is definitely wrong, is that you trigger the second download of all files for each previously downloaded file. Do it only once. Most of your code that is within
Though, that does not explain, why no file is moved. If you need a help with that, we need a session log file.
Anyway, what is definitely wrong, is that you trigger the second download of all files for each previously downloaded file. Do it only once. Most of your code that is within
foreach ($transfer in $transferResult.Transfers)
should be outside of it.
Though, that does not explain, why no file is moved. If you need a help with that, we need a session log file.
To generate the session log file, set
Session.SessionLogPath
. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.