How to create a batch file on Windows 10

preview_player
Показать описание
How to create a batch file on Windows 10
### Create basic Windows 10 batch file
1. Open Start.
2. Search for Notepad and click the top result to open the text editor.
3. Type the following lines in the text file to create a batch file:
@ECHO OFF
ECHO Congratulations.
PAUSE
4. Click the File menu.
5. Select the Save as option.
Once you complete the steps, you can double-click the file to run it
### Create advanced Windows 10 batch file
1. Open Start.
2. Search for Notepad and click the top result to open the text editor.
3. Type the following lines in the text file to create a more advanced Windows 10 batch file:
@ECHO OFF
:: This batch file details Windows 10, hardware, and networking configuration.
TITLE My System Info
ECHO Please wait... Checking system information.
:: Section 1: Windows 10 information
ECHO ==========================
ECHO WINDOWS INFO
ECHO ============================
systeminfo | findstr /c:"OS Name"
systeminfo | findstr /c:"OS Version"
systeminfo | findstr /c:"System Type"
:: Section 2: Hardware information.
ECHO ============================
ECHO HARDWARE INFO
ECHO ============================
systeminfo | findstr /c:"Total Physical Memory"
wmic cpu get name
wmic diskdrive get name,model,size
wmic path win32_videocontroller get name
:: Section 3: Networking information.
ECHO ============================
ECHO NETWORK INFO
ECHO ============================
ipconfig | findstr IPv4
ipconfig | findstr IPv6
PAUSE

### Create actionable Windows 10 batch file
1. Open Start.
2. Search for Notepad and click the top result to open the text editor.
3. Type the following command to map a network drive in the text file:
net use z: \\PATH-NETWORK-SHARE\FOLDER-NAME /user:YOUR-USERNAME YOUR-PASSWORD

#### Run batch file on-demand
1. Open Start.
2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
3. Type the following command to run a batch file and press Enter:

C:\PATH\TO\FOLDER\BATCH-NAME.bat

#### Run batch file with File Explorer
1. Open File Explorer.
2. Open the folder containing the batch file.
3. Double-click the script file to run it.

#### Run batch files on startup
1. Open File Explorer.
2. Open to the folder containing the batch file.
3. Right-click the batch file and select the Copy option.
4. Use the Windows key + R keyboard shortcut to open the Run command.

#### Run batch file on schedule
1. Open Start.
2. Search for Task Scheduler and click the top result to open the app.
3. Right-click the "Task Scheduler Library" branch and select the New Folder option.
4. Confirm a name for the folder — for example, MyScripts.
5. Click the OK button.
6. Expand the "Task Scheduler Library" branch.
7. Right-click the MyScripts folder.
8. Select the Create Basic Task option.
9. In the "Name" field, confirm a name for the task — for example, SystemInfoBatch.
10. (Optional) In the "Description" field, write a description for the task.
11. Click the Next button.
12. Select the Monthly option.
13. Click the Next button.
14. Use the "Start" settings to confirm the day and time to run the task.
15. Use the "Monthly" drop-down menu to pick the months of the year to run the task.
16. Use the "Days" or "On" drop-down menu to confirm the days to run the task.
17. Click the Next button.
18. Select the Start a program option to run the batch file.
19. In the "Program/script" field, click the Browse button.
20. Select the batch file you want to execute.

=====================================
LIKE || COMMENT || SHARE || SUBSCRIBE!
=====================================

↬ Twitter:
----------------------------------------------------------------------------
21. Click the Finish button.
5. Type the following command:
shell:startup
Рекомендации по теме
Комментарии
Автор

can you create a batch file that can open a browser reload it 10 times with a delay of 3 seconds and close the browser. And repeat the process again

jack_sparrow