How does the Win7 system create a batch file?

  

How does the Win7 system create batch files?

Method One:

1. First, we can create a new text file at any position.

2. Double-click to open the text document and "<quo;bat&rdquo ; Command input: (here to clean up the system garbage command as an example)

@echo off

echo Clearing system junk files, please wait...

del /f /s /q %systemdrive%*.tmp

del /f /s /q %systemdrive%*._mp

del /f /s /q %systemdrive% *.log

del /f /s /q %systemdrive%*.gid

del /f /s /q %systemdrive%*.chk

del /f /s /q %systemdrive%*.old

del /f /s /q %windir%*.bak

del /f /s /q %windir%prefetch*.*< Br>

rd /s /q %windir%temp & md %windir%temp

del /f /q %userprofile%cookies*.*

del /f /q %userprofile%recent*.*

del /f /s /q "%userprofile%Local SettingsTemporary Internet Files*.*"

del /f /s /q "% Userprofile%Local SettingsTemp*.*"

Del /f /s /q "%userprofile%recent*.*"

Echo clear system LJ complete!

echo. & pause

3, click In the upper left corner, <;file”—“save as", change “save type" to "all files", change the file name to "xitonghe.bat"; Suffix, must be “.bat” then click Save;

4, when using, it is best to right click on the batch, select “ run as administrator & rdquo; can.

Method 2:

1. Open “Computer”, click “Organize”—“Folder and Search Options>;

2 Click the “View” tab in the folder options, and ensure that the extension of the known file class is hidden in “Advanced Settings>; unchecked, click Apply and OK;

3, refer to method 1 step 1, 2 to enter the command into the text document, click the close button, select "ld" in the pop-up box, save & rdquo;;

4, will "ld new text document.txt" Right click and select “rename”, change the suffix name <;TXT” to “bat” press Enter, click “ is ” in the warning box that pops up.

Copyright © Windows knowledge All Rights Reserved