Topic "How to stop a script from prompting"

Author Message
Swindellvc

Guest


I have the following script

Code:
@ECHO OFF
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="P:\TK20FileInfo\WinSCP.log" /ini=nul ^
  /command ^
    "open ***  REMOVED FOR SECURITY^
    "lcd T:" ^
    "cd /home/cofcit" ^
    "put tk20*.txt" ^   
    "exit"^

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)
exit
exit /b %WINSCP_RESULT%


When the scrip get to the put command the Dos Box prompts me to overwite existing <Y>es <N>o <C>ancel A<p>pend ect.

How can I get this to always overwrite.

Now the server does have WINCP 4.3.1, and has existing jobs created by other user (who may no longer be here). We don't know if updating will break them.
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
You urgently need to upgrade, no matter what.
In the latest version, you won't get overwrite prompt.

Anyway, you can add option confirm off command at the beginning of your WinSCP command list.
https://winscp.net/eng/docs/scriptcommand_option
Advertisements

You can post new topics in this forum

Search

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License