File transfert with confirmation



File transfert with confirmation


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 /script=upload_alert.txt /parameter %CMS_INTERNET_USER% %CMS_INTERNET_PWD% %CMS_INTERNET_SERVEUR% %CMS_INTERNET_HOSTKEY% 


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


Thanks for your help.

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

Reply with quote



You can post new topics in this forum