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

martin

Re: How to stop a script from prompting

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
Swindellvc

How to stop a script from prompting

I have the following script

@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.