-->

Menghapus file otomatis setelah jangka waktu tertentu windows 7


REM Remove files older than 30 days
forfiles /p "C:\Users\YOURUSERNAME\Downloads" /s /m *.* /c "cmd /c Del @path" /d -30
sshot-1
sshot-2
Simply run the file to make sure it works and you will see that any files in your download folder are automatically sent to your Recycle Bin if they are older than 30 days.

Create a Scheduled Task

For the purpose of this example, we will schedule the automatic file deletion every seven days. Begin by opening the start menu and typing in “Task Scheduler” then running the application.
Alternatively, you can open your “Control Panel.” Under the “System and Security” section select the “Administrative Tools” option and then run the “Task Scheduler.”
Once you have the program open, click on the “Action” drop-down menu and select “Create Basic Task.”
sshot-3
You can give the task a name and description of your choosing. For this example, we will call it “Weekly Download Cleanup” and leave the description empty since the title is self-explanatory; then click “Next.”
sshot-4
From the “Trigger” section, we will choose to make the task a weekly action followed by pressing “Next.”
sshot-5
Now you will need to select a time and day. Remember to choose a time and day that your computer is powered on. For this example, we will just choose midnight on Friday then click next.
sshot-6
Now you will see the “Action” screen. We will leave this as is, since we want to run a specific program every Friday; so you can just click “Next.”
sshot-7
Now you will just need to click on “Browse” and select the batch file you created. As you can see, our batch file was saved on the desktop and is called “DownloadCleanup.bat.” Once you have done that, just click “Next.”
sshot-8
The last screen you will see gives you a comprehensive overview of the task you created. Once you verify that everything is right, just click “Finish” to complete the task creation and it will run automatically according to your specifications.
sshot-9
Now that you know how to schedule auto-deletion of your old files, you don’t need to worry about how to clear up any old files from your download folder.
Baca Juga

Related Posts

Post a Comment

Subscribe Our Newsletter