sftp - WinSCP Disable ResumeSupport in PowerShell -


i using winscp write connect sql server sftp server. trying write file sftp server have write access, not modify. having problem because back

cannot create remote file '/xxx.filepart'.

the documentation suggests because not have modify access target directory. did winscp -> preferences -> endurance -> disable
checked winscp.ini file , resumesupport 2 (i believe means disabled). ran "echo $transferoptions.resumesupport" , says in default state.

i have checked documentation:
https://winscp.net/eng/docs/ui_pref_resume
https://winscp.net/eng/docs/library_transferoptions#resumesupport

however, don't see powershell example, c#.

i have tried various permutations of $transferoptions.resumesupport.state = off, $transferoptions.resumesupport.off, , whatnot. 1 of these says it's read-only.

i know $transferoptions variable here comes default script. object determines transfer options $transferoptions = new-object winscp.transferoptions

thanks in advance

edit: overall problem have write access server, not modify. getting new error: "cannot overwrite remote file '/xxx'.$$. looks dollar signs sort of temp file it's trying create. there way disable whatever setting causing this?

syntax using enumeration in powershell described in article using winscp .net assembly powershell.

enumeration values accessed using static field syntax [namespace.type]::member, example [winscp.protocol]::sftp.


you can find powershell example transferresumesupport.state in converting .net assembly section of get , put command documentation:

$transferoptions = new-object winscp.transferoptions $transferoptions.resumesupport.state = [winscp.transferresumesupportstate]::off $session.getfiles(..., ..., $false, $transferoptions).check() 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -