Topic "syntax help"

Author Message
[View user's profile]

Joined: 2014-10-08
Posts: 1
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"
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27082
Location: Prague, Czechia
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"

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License