How to automatically answer the overwrite message
Hi,
I'm trying to set up an ftp program and i have it working and copying files, however its always prompts to overwrite. What i want is when this screen prompts a bit of code to automatically say no to all overwrites. Hopefully that makes sense my code is below:
option batch abort
option batch off
open serverbackup
put c:\test\*.* /lewis/test/*.* -preservetime
close serverbackup
this is the first part of the script saved in a tmp file.
@echo on
rem WinSCP Server Automated Backup.
rem Created for Quantact.com
rem Settings.
rem Server Login
set session=serverbackup
rem Folder Settings.
set server_folder=/var/www/html/
set local_folder=c:\Server_Backup\Archives\
rem Path to winscp.
set winscp_path=c:\Progra~1\WinSCP3\WinSCP3.com
rem Execute script
%winscp_path% /script=script.tmp %filelog%
rem Delete temporary script
del script.tmp
thats the second part saved as a txt file.
set winscp_path="C:\Program Files\WinSCP\WinSCP.exe"
%winscp_path% /console /script=script.tmp
pause
and that part is saved as a .bat file
Thanks
I'm trying to set up an ftp program and i have it working and copying files, however its always prompts to overwrite. What i want is when this screen prompts a bit of code to automatically say no to all overwrites. Hopefully that makes sense my code is below:
option batch abort
option batch off
open serverbackup
put c:\test\*.* /lewis/test/*.* -preservetime
close serverbackup
this is the first part of the script saved in a tmp file.
@echo on
rem WinSCP Server Automated Backup.
rem Created for Quantact.com
rem Settings.
rem Server Login
set session=serverbackup
rem Folder Settings.
set server_folder=/var/www/html/
set local_folder=c:\Server_Backup\Archives\
rem Path to winscp.
set winscp_path=c:\Progra~1\WinSCP3\WinSCP3.com
rem Execute script
%winscp_path% /script=script.tmp %filelog%
rem Delete temporary script
del script.tmp
thats the second part saved as a txt file.
set winscp_path="C:\Program Files\WinSCP\WinSCP.exe"
%winscp_path% /console /script=script.tmp
pause
and that part is saved as a .bat file
Thanks