Windows Batch Processing

Source: Internet
Author: User

Because of the need to learn a bit of Windows batch processing, you can write some bat scripts to automate the operation.

Batch file renaming
    1. For WIN10 users, the lock screen of Windows Focus pictures are some very good-looking, you can copy down as wallpaper.
    2. The picture path is C:\Users\username\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets , username is your user name
    3. You will find that the file name in the folder is a string of characters and cannot be opened, you can rename them individually, but it is too cumbersome to use our batch processing.
    4. Right-click inside the folder, create a new text document, and modify the suffix to. bat save.
    5. Edit the Bat file, write ren *.* *.png it, save it.
    6. Double-click Run Bat script file, you will find all the files become PNG suffix, including bat script, then select the picture you need.
    7. Windows cleans up this folder regularly, so you don't have to worry about its contents.
To open multiple pages in bulk
    1. Use the default browser to open the Web Page command forstart www.baidu.com
    2. One way to use a for loop is tofor /l %%i in (start,step,end) do ()
    3. One way to use the IF statement is to if %%i==5 compare the variables with quotes, such asif "!cnt!"=="5"
    4. Set choice /t 30 /d y /n >nul The delay, 30 is the number of seconds
    5. Close browsertaskkill /f /t /im MicrosoftEdge.exe
    6. Set set /a cnt = 0 the variable, which is included with the percent of the reference, and the reference variable in the For loop needs to turn on the delay variable, which is used when the script starts to join and setlocal enabledelayedexpansion references the variable!! Contains
    7. Open five pages, 30 seconds after the script is closed as follows:
@echo offfor /l %%i in (0,1,5) do (start www.baidu.com)choice /t 30 /d y /n >nultaskkill /f /t /im MicrosoftEdge.exe

Windows Batch Processing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.