| Cleptography |
7Sep2010 02:46 |
Batch Script + Wget to download web pages
This simple script uses wget.exe to download and covert links from a web page.
Wget has much more advanced options, than the one I use in this script, but it serves my general purpose.
Code:
@echo off
setlocal
:Check_Program_Path
if exist "%ProgramFiles%\GnuWin32\bin\wget.exe" goto :Check_Command_ARG
goto :ERROR_1
:Check_Command_ARG
if [%~1]==[] goto :ERROR_2
:: ELSE---
:Set_VARS
set Use_WGET="%ProgramFiles%\GnuWin32\bin\wget.exe"
set With_Arguments=-p --convert-links %~1
:Use_WGET_2_Download_Page
%Use_WGET% %With_Arguments%
goto :EOF
:ERROR_1
echo.Wget.exe was not found in your path!!!
goto :EOF
:ERROR_2
echo.No Address was specified!!!
echo.
echo.USAGE: DLPage google.com
goto :EOF
|