【发布时间】:2014-10-28 20:26:02
【问题描述】:
我必须使用 curl 上传文件。 我可以使用文件名上传单个或多个文件,但我想用 *.csv 掩码上传文件中的所有文件。我怎么能上传它。正如我在一篇帖子中看到的,curl 不支持通配符。
ForFiles /m *.csv /c "cmd /c curl.exe -u "username:passowrd" -ssl --cacert "cacert.pem" -F "pfile=@stasticsData.csv" -F "profileKey=001" https://somewebsite.com/api/api-upload.php >> output.txt
如果我可以使用以下相同的 ForFiles,我可以在 @file 中获取文件名
ForFiles /m *.csv /c "cmd /c echo @file
我试过合并,它不起作用,请帮助
ForFiles /m *.csv /c "cmd /c curl.exe -u "username:passowrd" -ssl --cacert "cacert.pem" -F "pfile=@file" -F "profileKey=001" https://somewebsite.com/api/api-upload.php >> output.txt
【问题讨论】:
标签: windows batch-file curl cmd command