代码之家  ›  专栏  ›  技术社区  ›  user8023823

当使用WinSCP选择要上载到FTP服务器的文件的掩码不匹配任何文件时,SSIS任务失败

  •  3
  • user8023823  · 技术社区  · 7 年前

    上传效果很好,但是如果没有上传文件,我需要这个过程失败(目前它只是循环通过并通过了一个成功)-在WinSCP命令文件中没有得到任何关于脚本编写的帮助。

    option batch on 
    option confirm off 
    open ftps://username:password@ftpsaddress/ -implicit -certificate="xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" 
    cd "/DIR/" 
    option transfer binary 
    put \\SERVER\Reports_BackUp\SFTP\*.csv -nopermissions -nopreservetime 
    close 
    exit 
    

    1 回复  |  直到 5 年前
        1
  •  1
  •   Martin Prikryl    7 年前

    假设SSIS监视进程退出代码,您可以使用 option failonnomatch on :

    option failonnomatch on
    put ...