Schedule weekly Excel file download to an unique name

后端 未结 1 1902
后悔当初
后悔当初 2021-01-07 09:43

We got a database where every Monday a Excel file gets uploaded from a client. The file is always the same name so if we forgot it we lost it. Is there a way how we can make

相关标签:
1条回答
  • 2021-01-07 10:01

    FileZilla does not allow any kind of automation.


    You can use this WinSCP script:

    open ftp://user:password@host/
    get "/path/sheet.xls" "c:\archive\sheet-%TIMESTAMP#yyyy-mm-dd%.xls"
    exit
    

    The script connects to the server, downloads the sheet to a local archive under a name like sheet-YYYY-MM-DD.xls.

    For details see:

    • Automate file transfers (or synchronization) to FTP server or SFTP server
    • Downloading file to timestamped-filename

    Then create a task in Windows scheduler to run the winscp.exe every Monday with arguments:

    /script="c:\path_to_script\script.txt" /log="c:\path_to_script\script.log"
    

    Logging (/log=...) is optional, but it's recommended.

    For details, see Schedule file transfers (or synchronization) to FTP/SFTP server.

    (I'm the author of WinSCP)

    0 讨论(0)
提交回复
热议问题