1. Home
  2. Windows

Move Files From Downloads To A Different Location Based On File Type

The Downloads folder can turn into a cluttered mess if you don’t purge it regularly. Not only is a large Downloads folder difficult to manage, finding files in it is always going to be a problem. If you’re looking to automate moving files from the Downloads folder to a more meaningful location, e.g. moving all images to the Pictures library, you can do so with a simple Python script. This script in question was developed by Reddit user grigby. It lets you choose the origin and destination folders to move files from/to. You can choose which file type will be moved to which folder making this one script work for multiple file types. Here’s how to set it up.

Download the script (link at the bottom) and open it in Notepad. You need to edit three things.

First, the location of the origin folder i.e. which folder files should be moved from. In this case, it’s the Downloads folder. If you want to apply this to a different folder, simply add the location of the folder in the following line replacing ‘C:\Users\Your User Name\Downloads’

move_from = "C:\Users\Your User Name\Downloads"

Second, you need to decide which files, based on type, will be moved to which folder. Again, the syntax is pretty simple and the script comes with ample examples that you can edit to suit your needs. You can move the files to any folder you want by changing the location.

In the line below, all PNG files will be moved to a ‘Saved Pictures’ folder inside my Pictures library. If you would prefer your PNGs be moved to a different location, simply replace the location “C:\Users\Fatima Wahab\Pictures\Saved Pictures’ with the one you want to move the files to.

move_files += [ [ "png" , "C:\Users\Fatima Wahab\Pictures\Saved Pictures" ] ]

Finally, scroll down and change the value of the line ‘Testing = True’ to ‘Testing=False’. Run the script to clean you Downloads folder up.

This script will work for any folder. You don’t need to necessarily use it for the Downloads folder. If you’re in the habit of saving files to your desktop, you can use this script to keep your desktop clean and send images, documents, and PDFs to a specific folder of your choice. You must have Python installed on your system for this script to work.

Download Script By Grigby

1 Comment

  1. I currently gain approximately 6,000-8,000 bucks a month with an internet task. For those of you who are considering to finish simple freelance task for some hrs daily from ease of your home and make good income while doing it… This is ideal for you… CLCK.RU/A54RG


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.