Closed LostLogic closed 6 years ago
the default behavior is to keep default permissions, so, based on the error, could it be the time stamp preservation? I have the behavior of the cmdlets use the same defaults as the WinSCP dll. so PreserveTimestamp defaults to true https://winscp.net/eng/docs/library_transferoptions. Maybe use the New-WinSCPTransferOption
and try setting that to false once?
Send-WinSCPItem -WinSCPSession $session -RemotePath $remotePath -LocalPath $localPath -TransferOptions ( New-WinSCPTransferOption -PreserveTimeStamp $false )
See if that helps.
Thank you for your reply dotps1. I'll check and see if that resolves my issue. Just have to wait for the accountants to generate some files to be uploaded
That seems to have done the trick! Thank you!
I'm sorry for ignoring the issue template, but seeing as this is more of the question I hope you'll forgive me.
I'm uploading files to a bank, and due to constrained rights when doing so, I get a Session Exception that I'm having a hard time negating.
I can't find the Ignore Permissions Error option anywhere as a switch to enable or an option in Transfer Options. Is it hidden somewhere, are there any tricks I can do to negate this issue so I get a result per file sent that I can error check before archiving the files sent etc? As the message above say, the upload was successful, but being an exception, no result is returned with Success etc.