Posted: 2009-09-01 14:53
I'm trying to script some commands using winscp so I can have a user run a .cmd windows batch file but some of the winscp commands don't seem to be working. It copies the file but it returns an exit code of 1 and an error because it's trying to set the permissions and/or timestamp on the remote server. Here is the command I'm running and the log output. I am running version 4.2.3 of winscp.
.cmd file contents:
C:\PROGRA~1\WinSCP3\WinSCP.com /script=G:\Dacm\temp\copy_DA_tnsnames.txt > G:\DACM\TEMP\copy_DA_tnsnames.log
option batch on
option confirm off
option transfer ascii
put -nopermissions G:\DACM\TEMP\DA_tnsnames.ora
Searching for host...
Connecting to host...
Using username "username".
Authenticating with public key "xxxxxxxx" from agent.
Starting the session...
Reading remote directory...
Active session:  gm625270@devapp0
G:\DACM\TEMP\DA_tnsnames.ora | 1 KiB | 0.0 KiB/s | ascii | 100%
Upload of file 'DA_tnsnames.ora' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option.
Error code: 3
Error message from server: Permission denied
Request code: 9
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
Location: Prague, Czechia
Have you tried adding -nopreservetime?
You can post new topics in this forum
And it's free!