Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

jkexbx

MY apologizes! I do not have permission to overwrite a file, but I do have permission to delete them. I was wondering how I get it to perform the "Press 'Delete' to delete the file and create new one instead of overwriting it."

Thanks
martin

Re: Press 'Delete' to delete the file and create new one instead of overwriting it

I'm not sure what your question is. You seem to try to overwrite a file, for which you do not have write permissions.
jkexbx

Press 'Delete' to delete the file and create new one instead of overwriting it

I'm trying to create a script to automatically upload files to a SFTP site. I want it to upload new copies if the file size if different, or just upload everything new each time. Sorry for all the cleansing I had to do.

The command I'm running is below and this will upload new files fine. But if the file already exists it gives the below error message.
/command " option batch continue" "open sftp://######:######@######//" "put ""C:\##########\*"" ""/##########/""" "exit"

. 2021-06-09 14:05:39.856 File: 'C:\#######\Log_201804_001.xls' [2020-06-22T12:51:39.850Z] [53248]
. 2021-06-09 14:05:39.858 Copying "C:\#######\Log_201804_001.xls" to remote directory started.
. 2021-06-09 14:05:39.858 Binary transfer mode selected.
. 2021-06-09 14:05:39.858 Opening remote file.
> 2021-06-09 14:05:39.858 Type: SSH_FXP_OPEN, Size: 71, Number: 11011
< 2021-06-09 14:05:39.936 Type: SSH_FXP_STATUS, Size: 36, Number: 11011
< 2021-06-09 14:05:39.936 Status code: 3, Message: 11011, Server: Permission denied, Language: en
> 2021-06-09 14:05:39.937 Type: SSH_FXP_LSTAT, Size: 55, Number: 11271
< 2021-06-09 14:05:39.977 Type: SSH_FXP_ATTRS, Size: 37, Number: 11271
* 2021-06-09 14:05:39.978 (ETerminal) Permission denied.
* 2021-06-09 14:05:39.978 Error code: 3
* 2021-06-09 14:05:39.978 Error message from server (en): Permission denied
. 2021-06-09 14:05:39.978 Asking user:
. 2021-06-09 14:05:39.978 Cannot overwrite remote file '/########/Log_201804_001.xls'.$$
. 2021-06-09 14:05:39.978 
. 2021-06-09 14:05:39.978 Press 'Delete' to delete the file and create new one instead of overwriting it.$$ ("Permission denied.
. 2021-06-09 14:05:39.978 Error code: 3
. 2021-06-09 14:05:39.978 Error message from server (en): Permission denied")
< 2021-06-09 14:05:39.978 Script: Cannot overwrite remote file '/#######/Log_201804_001.xls'.
< 2021-06-09 14:05:39.978 Script: Permission denied.
< 2021-06-09 14:05:39.978 Error code: 3
< 2021-06-09 14:05:39.978 Error message from server (en): Permission denied
* 2021-06-09 14:05:39.979 (ESkipFile) Cannot overwrite remote file '/######/Log_201804_001.xls'.$$
* 2021-06-09 14:05:39.979 
* 2021-06-09 14:05:39.979 Press 'Delete' to delete the file and create new one instead of overwriting it.$$
* 2021-06-09 14:05:39.979 Permission denied.
* 2021-06-09 14:05:39.979 Error code: 3
* 2021-06-09 14:05:39.979 Error message from server (en): Permission denied