Posh-SSH icon indicating copy to clipboard operation
Posh-SSH copied to clipboard

Set-SFTPFile : File already exists on remote host.

Open my-name-is-slim-shady opened this issue 6 years ago • 6 comments

When uploading multiple files to a host via powershell script the following error occurs but the files upload ok:

Set-SFTPFile : File already exists on remote host.

The remote directory is confirmed empty.

my-name-is-slim-shady avatar Mar 06 '19 19:03 my-name-is-slim-shady

Will check later this week

Sent from my iPhone

On Mar 6, 2019, at 3:32 PM, my-name-is-slim-shady [email protected] wrote:

When uploading multiple files to a host via powershell script the following error occurs but the files upload ok:

Set-SFTPFile : File already exists on remote host.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

darkoperator avatar Mar 06 '19 23:03 darkoperator

how are you running the command?

darkoperator avatar Mar 26 '19 20:03 darkoperator

Same issue.,..I am getting the files witha Get-ChildItem then enter a foreach loop. I chop up the path and rotate slashes for the SFTP remote path then invoke SET-SFTPFile thats the end of the foreach loop then moves on to the next file.

jhartweck avatar Jan 09 '20 16:01 jhartweck

What is the target system Sent from my iPhone

On Jan 9, 2020, at 12:01 PM, jhartweck [email protected] wrote:

 Same issue.,..I am getting the files witha Get-ChildItem then enter a foreach loop. I chop up the path and rotate slashes for the SFTP remote path then invoke SET-SFTPFile thats the end of the foreach loop then moves on to the next file.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

darkoperator avatar Jan 09 '20 16:01 darkoperator

Im not sure what youre asking. Im not sure what OS or SFTP software...just a sftp server to my knowledge.

jhartweck avatar Jan 09 '20 19:01 jhartweck

I would need to know so I can try to replicate the issue. With Linux servers with OepnSSH I have not been able.

On Jan 9, 2020, at 3:52 PM, jhartweck [email protected] wrote:

Im not sure what youre asking. Im not sure what OS or SFTP software...just a sftp server to my knowledge.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/darkoperator/Posh-SSH/issues/259?email_source=notifications&email_token=AAD7IHUY7KMC7H4UDG7RJWDQ456AXA5CNFSM4G4GTDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIRR5LQ#issuecomment-572726958, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD7IHRH5ILFHMTVYBJG2RLQ456AXANCNFSM4G4GTDBQ.

darkoperator avatar Jan 09 '20 20:01 darkoperator