Tool Preparation
wget ( click to download )
Batch command ( click to download )
User interface:http://area.sinaapp.com/bingImg?daysAgo=1(1 for days)
Implementation steps
1. Open Notepad and copy and paste the following code, new -Save as , file type select " All Files ", file name: Download bing background image. Bat (click Download), save on desktop.
@echo offset var=%cd%MD bingimg&cd bingimg for in Do%var%\ wget http://area.sinaapp.com/bingImg?daysAgo=%%i
2. Unzip the downloaded files to the Bing background image. Bat in the same level directory (here all on the desktop).
3. Double-click the Bing background image. Bat.
4, after downloading, the window will automatically exit, at this time the desktop will be more than a bingimg folder.
5. Download the result (23 photos of the history picture).
Code explanation
@echo offset var=%cd%MD bingimg&cd bingimg for in Do%var%\ wget http://area.sinaapp.com/bingImg?daysAgo=%%i
@echo off from the beginning of the bank to turn off Echo.
Set var=%cd% Set var: declares a variable var. %cd%: represents the absolute address of the directory where the current file is located, meaning that the address is passed to Var.
MD bingimg& CD bingimg create (MD)bingimg folder, and (&) Enter (CD) Bingimg folder
For/L %%i in (0,1,30 ) do%var%\wget http://area.sinaapp.com/bingImg?daysAgo=%%i
- for Batch loop directives.
- The/ l for parameter, which handles the sequence of numbers. (Note: l is lowercase, although it is nonsense, but still a reminder, avoid being considered as "1" or "|" UP).
- %%i A variable that passes a parameter.
- in the picture, his back is the loop parameter.
- (0,1,30) loop parameter, which in turn represents start from zero , self-increment is 1 , over 30 loops end.
- Do Just write, anyway, back. is the command that needs to be executed.
- The absolute address of the directory where the %var%\ wget program is located, which is the value%cd% passed to Var. (Note: "\" must not be less.) Wordy, for example: C:\Users\Youge\desktop\wget.exe, "\" is wget.exe after the "\", if you go, it will become c:\Users\Youge\ Desktopwget.exe, this path is invalid at this time, sorry wordy.
- wget http://area.sinaapp.com/bingImg?daysAgo=%%i wget's download instruction, followed by the URL, where "%%i " is the number of days.
For the for instruction does not understand can be entered in cmd:for/? (Here's another trick: if you don't know the instructions in DOS, we can add "/?" to the instructions, so we can find out the instructions related to help)
How do I bulk download background images for Bing before more than 20 days?