Automatically erase all contents in the specified folder when you boot up 10

Updated on technology 2024-02-09
7 answers
  1. Anonymous users2024-02-05

    Add a batch file and a command to the self-starting project in the system. Here's how:

    Save the following red character ** with the suffix "inf", for example, "Add a file name from the startup, right-click on it, and then select "Install". Then save the following blue-green character ** as the suffix named "BAT", and modify the content to the path of the folder you want to delete, and put it in the root directory of the D drive.

    version]

    signature=$chicago$

    defaultinstall]

    addreg=

    hkcu,software\microsoft\windows\currentversion\run,temp,0,"d:\

    echo off

  2. Anonymous users2024-02-04

    Use rmdir s q directory s to delete the directory and all subdirectories and files in the directory (use the parameter q to cancel the deletion operation and delete it directly).

    For example, everything in folder 1 under e: cannot be deleted.

    You can re-cmd

    e:mdir /s /q 1 /s

    Press Enter to delete the entire folder and its subfiles.

    Make a batch of the command line, add it to the start item or add it to the task plan to start the machine and run it.

  3. Anonymous users2024-02-03

    Use Notepad as a txt file.

    The content is: del f

    The path of the sq file (e.g

    c:\windows\system32\**rd/s

    q File path (e.g

    C: Windows System32 **Change the suffix to BAT after saving

    to the Start menu.

    program startup group.

  4. Anonymous users2024-02-02

    How do I set my computer to shut down and automatically clean up a specific folder? I hope that some files can be automatically cleaned up when the computer is shut down, especially some temporarily saved personal documents or**, I don't want to keep them on the computer after the shutdown, and the following is to share the setting method.

    1. First of all, you need to create a text document outside the folder of the deleted file, the example is to delete all the ** under the "2" folder, so this text document must be built outside the "2" folder, create a document method, right-click in the blank space -> create a new > text document.

    2, and then open this text document, enter the command "del file path q" in the window, in this article you want to delete the ** below d: 1 2, so this ** should be written as: del d: 1 2 q

    After writing, to save, pay attention to delete the ** format, del is the delete command, then a space, then write the path of the folder to be deleted, another space, and then write the q parameter.

    3. After saving, change the suffix of this text document to: Bat format, that is, batch format, pop up the warning box, press "OK", and the cleanup file is ready. The name of this batch file can be arbitrary, such as "shut down and clean up the specified folder", but the suffix must be.

    BAT format, 4, here's how to set up this batch file to run automatically when it is shut down. In the Start menu, open Run, and then enter the command, OK.

    5. After entering the Group Policy window, select the item "Windows Settings".

    6, then under "Windows Settings", select the item "Scripts (Startup Shutdown)", come to the right window, and select "Shutdown". Double-click.

    7. In the shutdown properties window, find the "Add" button and click Open.

    8. In the Add Script window, click the "Browse" button to load the batch file you just created.

    9. Find the "Shutdown Cleanup" folder you just created. bat batch file, press "Open", then go all the way back to "OK", "Apply" and then "OK". The whole process is set up, and when the computer is shut down, the batch file will be started to clean up the files under the specified folder.

    10. If you want to terminate the batch processing at shutdown, also in the shutdown properties window, select a script to be deleted, and press "Delete".

    Note: This deletion method must be carried out under normal shutdown to be effective, if it is directly shut down by the power shutdown method, it is impossible to start the deletion script, and the specified file cannot be deleted.

  5. Anonymous users2024-02-01

    The computer will continue to produce a large number of system files and temporary junk files in use, these junk files will not only occupy a lot of system disk space if not cleaned up in time, but also directly affect the running speed of the system, but many users ignore the cleaning of the computer before using the computer, and the computer will become slower and slower over time.

    In fact, we can set the computer to automatically clean up temporary files when it shuts down, so that the computer will not accumulate a large number of temporary junk files, let's take a look at the operation method of win7 shutdown to automatically clean up temporary files.

    Step 1: Create an automatic cleanup of temporary files. bat file.

    1. Start - All Programs - Attachments - Notepad;

    2. In the open notepad, type: del folder path q, left-click the file, left-click in the drop-down menu: save as;

    3. In the open Save As window, click: Desktop, and enter Temporary File Cleanup in the file name (n) column. bat, and then click: Save.

    Set up tips for automatically cleaning up temporary junk files when your computer shuts down.

    Step 2: Clean up the temporary files. bat file to the script shutdown file.

    1. Start - Run (Enter OK or Enter, open the local group policer;

    2. In the local Group Policyr window that opens, go to Computer Configuration - Windows Settings - Script (Start Shutdown), left-click and double-click Shutdown on the right side of the window;

    3. In the Shutdown Properties window that opens, click: Add;

    4. In the Add Script window, we click: browse;

    5. Found in the open desktop: Temporary File Cleanup. bat and left-click double-click: Temporary File Cleanup. bat;

    6. Temporary file cleanup has been added. bat file, click: OK;

    7. Go back to the shutdown properties window and click: Apply - OK.

    Create an automatic purge of temporary files. bat file, let this file run automatically when the computer is shut down, then the computer's temporary junk files will also be automatically cleaned up, which is also a necessary skill for lazy people.

  6. Anonymous users2024-01-31

    2.Then open the text document and enter the command "Del file path q" in the window, which is what you want in this article.

    3.Once saved, change the suffix of the text document to. BAT format, i.e., batch format, pops up a warning box, press "OK"...

    4.Here's how to set up this batch file to run automatically when it shuts down. In the Start menu, open Run, and then enter.

    5.Once in the Group Policy window, select the "Windows Settings" item.

  7. Anonymous users2024-01-30

    If you do this, you can only set it up through the computer manager or the 360 security guard.

Related questions
5 answers2024-02-09

How to clean up non-system files in the C disk of Win10 system computer? Generally, if it is a file of other disks, if it is a letter of other disks, then you can clean it up at will, but if it is a file of the system disk C disk, most users dare not easily delete it, and deleting the wrong one will cause the system to fail to boot normally! So how do we clean up junk files that are not system files in C drive? >>>More

18 answers2024-02-09

There are two main reasons for the failure of computer self-start: one is that the B iOS is not properly set, when the timer boot function is set to "e nabled", the machine will automatically turn on at a certain time on a certain date. In addition, some motherboards have an auto-turn on function setting in the B iOS settings, if this function is selected, the machine will automatically turn on when the power is on. >>>More

11 answers2024-02-09

I'm having the same problem with my computer as yours. The following 3 are the answers that others have given me to solve, so I'll show you. >>>More

7 answers2024-02-09

Your question is not very clear yet. Does the computer automatically start up after the power is off, and if so, then the problem should be that the computer restarts frequently. Reboot the computer itself: >>>More

16 answers2024-02-09

It can be preliminarily ruled out that the CPU overheating causes automatic shutdown. Please check the memory module, motherboard, and power supply.