syntax help

Advertisement

AllyTech
Joined:
Posts:
1

syntax help

I am getting this error:
Upload of file .. was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option.

I need to know how to place the nopreservetime and nopermissions switches in this line of code:

winscp /session "%WinSCPSavedSession%" /command "cd /" "lcd %ProdDriv%\%PSCUpymt%" "put test.txt" "exit"

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,671
Location:
Prague, Czechia

Re: syntax help

Your syntax is very wrong. There's no /session switch in WinSCP. You should not open session for scripting using command-line parameter. Use open command.
The -nopreservetime and -nopermissions switches go after the put.
Also unless you are using the latest beta release, you should use option batch abort and option confirm off commands:

winscp /command "option batch abort" "option confirm off" "open "%WinSCPSavedSession%" "cd /" "lcd %ProdDriv%\%PSCUpymt%" "put -nopreservetime -nopermissions test.txt" "exit"

Reply with quote

Advertisement

You can post new topics in this forum