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:
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: