Luis Diaz
asked on
Windows batch: send multiple files based on a txt file
Hello experts,
I have the following code which allows me to send single file to a website.
I would like to modify as following:
1-Add a for each loop and place the various names in another list.txt file. Script should loop the various names reported in the the list.txt and send files.
If you have questions, please contact me.
Thank you in advance for your help.
I have the following code which allows me to send single file to a website.
I would like to modify as following:
1-Add a for each loop and place the various names in another list.txt file. Script should loop the various names reported in the the list.txt and send files.
If you have questions, please contact me.
Thank you in advance for your help.
@echo off
rem Set curl path.
set CURL="curl/curl"
cd "%cd%"
rem Set site url.
set SITE_URL=
rem Set login.
set LOGIN=
rem Set password.
set PASSWORD=
rem Set service number.
Set SERVICE_NUMBER =
rem Set action url.
set ACTION_URL=%SITE_URL%/sendFile/%SERVICE_NUMBER%
rem Set input file path and name.
set PARAM_PROXY=
set FILE="file=@toto.csv"
rem Import the file.
curl -v -k %ACTION_URL% -u %LOGIN%:%PASSWORD% -F %FILE%
pause
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER