Running certain programs may prompt the system to continue with the selected action. This usually refers to programs that can potentially lead to the loss of the computer's performance. In batch files, the lack of a response to the request looks like a program hang.
Instructions
Step 1
Create any new folder in an arbitrary directory named "Folder" and place in it any unnecessary file, for example a text document, to initiate confirmation of a potentially dangerous action that causes a system request.
Step 2
Call the main menu of the Windows operating system by clicking the "Start" button and go to the "Run" item. Enter the value cmd in the "Open" field to launch the "Command Line" utility and confirm the execution of the launch command by clicking OK. Enter a command of the form: del drive_name: Folder in the command interpreter text field and wait for the system to confirm the deletion: drive_name: Folder *, Continue [Y (yes) / N (no)]? The delete command will not be executed until the desired key is pressed. Running the.bat file in Automatic mode will cause the entire package to stop executing.
Step 3
Cancel the command to delete the created folder by pressing the function key N and use the following syntax to redirect the command: echo Y | del drive_name: Folder, in this case the pipe character is used to not use the output to the screen, but to attach it to the next command … Thus, the response to the system's request to delete all files in the selected folder will already contain a confirmation.
Step 4
Use the above procedure to create batch files that include sets of Windows command line commands. These files are created in the standard Notepad application, but saved with the.bat extension. Specify valid commands in the command interpreter by entering the value help. Take advantage of the automatic launch of the batch programs provided by the Task Scheduler or select the option to create a folder from a batch file implemented by the MKDIR command.