使用 cURL 在 FTPS 伺服器上進行檔案操作

使用 cURL 在 FTPS 伺服器上進行檔案操作

我需要在某個遠端 FTPS 伺服器上執行一些檔案傳輸操作,該伺服器使用來自 Windows 2008 腳本環境的憑證驗證,因此這就是我一直使用 cURL 的原因。

我已經從以下位置下載了 Windows 的 cURL x64 版本 - 7.33.0: http://www.confusedbycode.com/curl/

我像這樣連接到伺服器:

curl --cert mycert.crt --key mykey.key -k -v -u user:pass ftp://IP:990/ --ftp-ssl

FTPS伺服器結構是這樣的:

/homedir

 pyr_<ID> 
    - archives
    - commun
    - in 
    - out

 pyr_<ID2>
    - archives
    - commun
    - in 
    - out

 pyr_<ID3>
    - archives
    - commun
    - in 
    - out

...

我的任務是:

  • 將與通配符相符的檔案:filename*.csv 從所有 /pyr_*/out 資料夾移至本機資料夾。

  • 將所有 filename_ID*.csv 檔案從本機資料夾複製到 FTPS 伺服器各自的 /pyr_ID/in 資料夾中

答案1

我發現 MOVEit Freely 實用程式適合我的需求。希望它可以幫助其他人尋找解決方案。

相關內容