-
echo off
del "c:\documents and settings\administrator\application data\microsoft\templates\" /q
if exist "c:\documents and settings\administrator\application data\microsoft\templates\" (
echo delete failed) else(
The echo deletion was successful.
pause The owner can try to bet: because there is a space in the path, you need to add double quotation marks when writing the path, and because the del command returns 0 regardless of whether it is run successfully or fails, it is necessary to use the method of checking whether the file exists to check whether the deletion is successful.
-
This needs to be run in cmd under Windows"c:\documents and settings\administrator\application data\microsoft\templates\"
-
Delete the batch file itself, or you can copy it with a command like copy %0.
Batch processing is a simplified scripting language, also known as macros. It is used in DOS and Windows systems, and it is a command interpreter (usually Command.) embedded in DOS or Windowscom or explain the run.
Similar to shell scripts in UNIX. Batch files have. bat or.
The simplest example of a cmd extension is a line-by-line writing of the various commands that are used in the command line. In more complex cases, it is necessary to use the operation process of command and control programs such as if, for, and goto, as in intermediate and high-level languages such as C and basic.
If more complex applications need to be implemented, it is necessary to use external programs, including external commands provided by the system itself and tools or software provided by third parties. A batch file, or batch program, is a plain text file composed of dos commands, which can be created directly with notepad or with dos commands, or with a dos texter. Type the name of the batch file at the Command prompt, or double-click the batch file to invoke the batch program.
In general, each command occupies one line; Of course, it is also possible to use multiple commands with specific symbols (such as & ; etc.) to be written in the same line; In other cases, more advanced commands such as if and for occupy a few lines or even dozens or hundreds of lines. The system interprets that when running a batch program, it first scans the entire batch program, and then executes all commands sentence by sentence starting from the first line ** down until the end of the program or encounters an exit command or exits unexpectedly with an error.
Before understanding batch processing, we must first understand what DOS is, DOS is a once popular operating system, it is a single-user, single-task, command-line-based system, to complete each task to use commands to achieve, such as copying files, creating directories MD, deleting files MD, formatting hard disk information, etc., unlike Windows can be clicked with a mouse, because there was no mouse at that time. Because DOS was also Microsoft's MS-DOS was the most famous, and later Windows was also developed on the basis of DOS, until now Windows still retains DOS, which is now called "Command Prompt". >>>More
attrib c: windows system32 +h, pay attention to the spaces. >>>More
rem sets the date format to yyyymmdd
if %date%==20080806 goto doitrem If the time is equal to 20080806 jump to the designator doitrem If the time is not equal to, proceed to the next step. >>>More
echo off the beginning of the stove and the beginning of the blind carry the sacred mountain. >>>More
2800+Frequency modulation is not adjusted to 1900+,The key reason for the white screen is that the power supply voltage of the motherboard is unstable caused by capacitor damage,Your problem can generally be solved after the merchant has replaced the capacitor for you!!