Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

apprenti

Hello,

I find the solution. I delete the option batch abort and it's good. :D

Sorry for the inconvenience.
apprenti

File transfert with confirmation

Hello,

I use Winscp to transfer files. I'm a beginner but i have created a small script. This script it's ok but if the user would transfert a file with the same name the old file it's destroy.
I would like in this event the user confirms this choice. I see the documentation and the switch option confirm off at on. But my script go to the end and the user doesn't write y or n to confirm or unconfirm this choice...

I don't understand this problem.

In the first file it's general configuration and the script call:

@echo off




cd winscp

call server-configuration



winscp.com /script=upload_alert.txt /parameter %CMS_INTERNET_USER% %CMS_INTERNET_PWD% %CMS_INTERNET_SERVEUR% %CMS_INTERNET_HOSTKEY%



pause


The script's file it upload_alert.txt.



option echo off


option batch abort

option confirm on

option transfer ascii



open sftp://%1%:%2%@%3%:22 -hostkey="%4%"

lcd ..

cd Bureau/transfert

put G:\dossier\*.odt

pause*


Thanks for your help.

Sorry if my english is bad it's not my fist language.[/img]