Changes between Version 19 and Version 20 of Docs/Prog/Manual/DeviceSupport/Network


Ignore:
Timestamp:
09/04/19 10:00:37 (5 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/DeviceSupport/Network

    v19 v20  
    487487rem - Batch file to upload a file from a PC to an 825 using the 825 web server and Windows 10 cURL
    488488set user=ADMIN
    489 set password=*****
     489set password=81440
    490490set ip=10.1.0.179
    491 set filename=C:\testfile4.txt
     491set filename=C:\testfile5.txt
     492set dir825=/mnt/nand/apps/
     493set cookiesfile=%userprofile%\Downloads\cookies825.txt
    492494rem - Login to the 825 web server
    493 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%"
     495curl -v -b %cookiesfile% -c %cookiesfile% "http://%ip%/cgi-bin/index?p=login&a=login" --data "user=%user%&password=%password%"
    494496timeout 5
    495497rem - Set the directory the file will be uploaded to
    496 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/"
     498curl -v -b %cookiesfile% -c %cookiesfile% "http://%ip%/cgi-bin/index?p=filemgr&a=cd&d=%dir825%"
    497499timeout 5
    498500rem - Upload the file
    499 curl -v -b %userprofile%\Downloads\cookies.txt -c %userprofile%\Downloads\cookies.txt -F file=@%filename% "http://%ip%/cgi-bin/index?p=filemgr&a=new"
    500 
     501curl -v -b %cookiesfile% -c %cookiesfile% -F file=@%filename% "http://%ip%/cgi-bin/index?p=filemgr&a=new"
    501502}}}
    502503