| 482 | |
| 483 | == Batch file to upload a file from a PC to an 825 using the 825 web server and cURL (tested with Windows 10 cURL) == |
| 484 | |
| 485 | {{{ |
| 486 | rem - Batch file to upload a file from a PC to an 825 using the 825 web server and Windows 10 cURL |
| 487 | set user=ADMIN |
| 488 | set password=81440 |
| 489 | set ip=10.1.0.179 |
| 490 | set filename=C:\testfile4.txt |
| 491 | rem - Login to the 825 web server |
| 492 | curl -v -b %userprofile%\Downloads\cookies.txt -c %userprofile%\Downloads\cookies.txt "http://%ip%/cgi-bin/index?p=login&a=login" --data "user=%user%&password=%password%" |
| 493 | timeout 5 |
| 494 | rem - Set the directory the file will be uploaded to |
| 495 | curl -v -b %userprofile%\Downloads\cookies.txt -c %userprofile%\Downloads\cookies.txt "http://%ip%/cgi-bin/index?p=filemgr&a=cd&d=/mnt/nand/apps/" |
| 496 | timeout 5 |
| 497 | rem - Upload the file |
| 498 | curl -v -b %userprofile%\Downloads\cookies.txt -c %userprofile%\Downloads\cookies.txt -F file=@%filename% "http://%ip%/cgi-bin/index?p=filemgr&a=new"}}} |
| 499 | |