We have created a directory for the Downloads folder. The next step on the script, move files to revolve location. To assist in this, we will create a helper function that will take in the old file path and return us to the new path. This new path will have the folder name in which we are to move later. Files are covered.
They are organized in their various folders in Downloads. The next step does the same for unknown folders. Well, our script is ready. Next up we will have to create a bat file. This file will handle what happens every week in Windows.
We will use Windows Task Scheduler for scheduling our Python script. It should look something like this:. How-To Geek shares the following script to automatically delete files that are older than 30 days from the downloads folder:.
Now the batch file will launch according to the preferences you selected in "Task Scheduler", sending your old files in your Downloads folder to your Recycle Bin. I'm a big fan of Belvedere. It's been my favorite tool for keeping my temp folder clean on my work computer. Just make sure to move the batch file inside the folder that needs to be sorted out. That is it. These were the steps to create a Batch file and sort Downloads folder on your PC.
Do let us know in the comments, what do you think of this useful tip. This site uses Akismet to reduce spam. Learn how your comment data is processed. In this Article hide.
0コメント