I need to upload a file from a windows computer to a server on which I have full control. But since I don't have access to that computer, a technician will copy a minimal batch script with a schedule. So I chose WINHTTPJS BATCH.
I already used it to download the file :
call winhttpjs.bat "http://192.168.1.248:8070/spectra/download-xls" -method GET -headers-file headers.txt -reportfile reportfile.txt -saveTo spectra_connect.xls
Now I need the command to specify the file to be uploaded. I tried :
call winhttpjs.bat "http://192.168.1.248:8070/spectra/upload-xls-files" -method POST -headers-file headers.txt -reportfile reportfile.txt -file spectra_connect.xls
But -file spectra_connect.xls
option does not exist. I tried -body-file
, but those seems to read the file contents to parse and push them. I can't even get how to send a field (like input) as the POST data. I need help on this. If I can't I'm gonna have to change to wget or curl which is more work for the remote technicians.