force upload through sftp using a batch file

Jacob Lepley
Jacob Lepley used Ask the Experts™
I have a batch file that is used to sftp a file by calling winscp. However if the file exist on the sftp server it does not over write it. Below is the command i am using. Can you tell me how to overwrite the file if it already exists please?
put -nopreservetime -nopermissions L:\PROGRA~1\TCI\RETAIL~1\HQPM\Batch\..\hosttran\export\Shipt\Product\Weis_product*.zip 

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT / Software Engineering Consultant
Top Expert 2016
Try sending "option confirm off" before the "put", that should force overwrites.

option :: WinSCP

Jacob LepleyBusiness Systems Programming Analyst


Thank you Bill! I thought it would be something simple just could find what it was.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial