📜  curl ftp 上传文件到目录 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:38.190000             🧑  作者: Mango

代码示例1
@echo off 
set localdir=C:\something
set ftphost=your.ftp.host.com
set ftpuser=yourftpuser
set ftppass=yourftppassword
set ftpdir=target/directory/on/server

setlocal enableDelayedExpansion

for /F %%x in ('dir /B/D %localdir%') do (
  set FILENAME=%localdir%\%%x
  curl -T !FILENAME! ftp://%ftphost%/%ftpdir%/ --user %ftpuser%:%ftppass%
)