Skip to content

Instantly share code, notes, and snippets.

@hklcf
Created August 4, 2016 12:32
Show Gist options
  • Save hklcf/30c3370b3e82ac1315d2c915dee8c297 to your computer and use it in GitHub Desktop.
Save hklcf/30c3370b3e82ac1315d2c915dee8c297 to your computer and use it in GitHub Desktop.
@echo off
echo -----------------------------------------------------------
echo Copyright (c) 2007 HKLCF. All rights reserved.
echo -----------------------------------------------------------
echo Processing ... Please wait
echo/
set hd=C:\
set dir=Speedtest
set report=Speedtest_Report.txt
cd %hd%
md %dir%
cd %dir%
set tmp=speedtest.tmp
set dl_url=download.speedtest.com.hk
set ul_url=upload.speedtest.com.hk
set usr=anonymous
set pas=
set filename=100MBvideo.zip
echo -----------------------------------------------------------> %hd%%report%
echo Copyright (c) 2007 HKLCF. All rights reserved.>> %hd%%report%
echo ----------------------------------------------------------->> %hd%%report%
echo/>> %hd%%report%
echo open %dl_url%>%tmp%
echo %usr%>>%tmp%
echo %pas%>>%tmp%
echo get %filename%>>%tmp%
echo quit>>%tmp%
echo Downloading %filename%..
ftp -s:%tmp%>> %hd%%report%
echo open %ul_url%>%tmp%
echo %usr%>>%tmp%
echo %pas%>>%tmp%
echo put %filename%>>%tmp%
echo quit>>%tmp%
echo Uploading %filename%..
ftp -s:%tmp%>> %hd%%report%
del %tmp% /f /q
del %filename% /f /q
cd %hd%
rd %dir% /s /q
echo/
echo Generate report to %hd%%report%
echo. & pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment