If you frequently download content from the internet, organizing it for quick access can get hectic. By default, Windows saves everything in the Downloads folder. Over time, things pile up there, disorganized and difficult to skim for what you’re looking for. Cleaning it up is even more difficult. You may inadvertently delete important documents saved years back. What’s the solution?
There are several depending on your exact needs. In this tutorial, we'll go through all the available options to manage and organize downloads. A couple of them can be used on Linux and macOS too.
We'll also look at a script-powered solution to automate the downloads management process. So, let's get started and master management of internet downloads on a Windows machine.
1. Clean Old Downloads Through Storage Sense
An average Windows user most probably deletes files from the Recycle Bin now and then. But what about old downloads in the Downloads folder you haven't touched in ages?
Storage Sense is a built-in Windows utility to automatically delete such downloads. Let's see how to use it.
- Go to Settings → System → Storage.
- Switch on the Storage Sense service.
📷 Storage Sense settings - Adjust and tweak the file deletion options as per our needs to create a custom schedule.
- You can schedule it on a daily, weekly, monthly, or low disk space basis.
There can be a slight difference in the interface between Windows 10 and 11, but the underlying job of this tool is exactly the same.
2. Use Web Browser's Download Settings
Every modern web browser allows you to set a custom download folder. You can also enable/disable a file saving dialogue box to change the folder location on per download-basis.
Make sure to set the following two download settings:
- Choose a custom folder for the downloads. Ideally, choose a drive other than
C:. You can also create browser-specific folders, if required. - Also, enable the file saving dialog box. It lets you choose a different saving location for selected files.
3. Segregate Downloads by File Type
While processing the Downloads folder, one can struggle to pick similar types of files in one go. It makes the downloads management process cumbersome.
But, here's how you can make it easier.
- Open the Downloads folder in File Explorer.
- Right-click anywhere in the space and choose the Group by option from the context menu.
- Select the Type option from the submenu.
And there you have it! All the downloads grouped by file type. This helps you manage them easily in every way possible.
4. Organizing Downloads Through a PowerShell Script
Now let's create a simple PowerShell script that automatically organizes files in the subfolders based on their file type.
If you are not comfortable writing scripts, there's no need to panic, as I'll go through the script to make you understand everything.
Create a Script File
Create a file Auto-Organize-Downloads.ps1 at your preferred location. Now add the following script to it and save the file.
# Auto-Organize-Downloads.ps1
# Save files in the Downloads folder into subfolders by file type.
$Downloads = Join-Path $env:USERPROFILE "Downloads"
# Folder name = list of file extensions that belong in it
$Rules = @{
"Images" = @(".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp", ".svg")
"Documents" = @(".pdf", ".doc", ".docx", ".txt", ".xls", ".xlsx", ".ppt", ".pptx", ".csv")
"Archives" = @(".zip", ".rar", ".7z", ".tar", ".gz")
"Installers" = @(".exe", ".msi", ".msix")
"Videos" = @(".mp4", ".mkv", ".avi", ".mov")
"Audio" = @(".mp3", ".wav", ".flac", ".m4a")
}
# Skip files changed in the last 60 minutes
$ChangeMinutes = 60
# Skip temporary files that web browsers create during a download session
$TempFileExtensions = @(".crdownload", ".part", ".tmp", ".download")
Get-ChildItem -Path $Downloads -File |
Where-Object {
$_.LastWriteTime -lt (Get-Date).AddMinutes(-$ChangeMinutes) -and
$_.Extension -notin $TempFileExtensions
} |
ForEach-Object {
$ext = $_.Extension.ToLower()
$folder = "Other"
foreach ($key in $Rules.Keys) {
if ($Rules[$key] -contains $ext) { $folder = $key; break }
}
$destDir = Join-Path $Downloads $folder
New-Item -ItemType Directory -Path $destDir -Force | Out-Null
# Avoid overwriting files: append (1), (2)... if the name already exists
$dest = Join-Path $destDir $_.Name
$n = 1
while (Test-Path -LiteralPath $dest) {
$dest = Join-Path $destDir ("{0} ({1}){2}" -f $_.BaseName, $n, $_.Extension)
$n++
}
Move-Item -LiteralPath $_.FullName -Destination $dest
}
Now let me explain the workings of this script so that you can tweak, modify, or extend it as per your needs.
- The
$Ruleslookup table is where you add subfolder categories and the file extensions associated with each category. Feel free to add more file extensions to existing categories (if required) or create new subfolder categories with associated file extensions. - Another variable you can tweak is
$ChangeMinutesthat governs skipping of files modified within the number of minutes specified here. Change this value as per your preference. - The variable
$TempFileExtensionshouses all the well-known temporary file extensions applications assign to partial downloads while the download process is going on. You can add more extensions to it, if applicable in your case. - In case a file doesn't fall under any category specified in the rules table, it is shifted to the
Othersubfolder. - And lastly, if a duplicate file name conflict arises during the file transfer process to a subfolder, incremental numbering is appended to the file name. This avoids any information loss.
If you are using a custom Downloads folder, make sure to hard-code its full path in the $Downloads variable.
Schedule it Through Windows Task Scheduler
To automate this organizing process, you need to run this script at regular intervals. Here's how to do it.
- Press the Win key and type Task Scheduler. Select the app in the menu and open it.
- Click the Create Basic Task... option from the right pane.
- Give a meaningful name to the task. E.g., 'Auto Organize Downloads'.
- Select when the task should execute repeatedly. I recommend choosing the When I log on option.
- Action should be Start a program, the default option.
- In the Program/script text box, type
powershell.exe. - In the Add arguments text box, paste the following:
Change the file path to match your script's location.-NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File "F:\Script_Path\Auto-Organize-Downloads.ps1" - Finally, click the Finish button to complete the task creation process.
Enhance the Script for Automated Deletions
If you also want to automatically delete setup or installer files after a specific number of days, you can add the following snippet at the end of the script given above.
$InstallerDir = Join-Path $Downloads "Installers"
if (Test-Path $InstallerDir) {
Get-ChildItem -Path $InstallerDir -File |
Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-60) } |
Remove-Item
}
This snippet will delete installer files older than 60 days. You can adjust the number of days as per your requirements.
5. 3rd-Party File Organizing Tools
If you don't want the hassle of writing scripts, some good 3rd-party tools are available for easy management of files. Here are my top 3 picks:
- File Juggler - It's a premium tool that enables you to trigger different types of actions based on the file type.
- DropIt - This powerful and free tool performs custom actions on files when dropped on the target image. A must-try!
- Organize (command-line) - And the last one is a flexible command-line tool with custom rules support to manage and organize files.
Conclusion
Downloads management on Windows can feel hectic if not done properly. Fortunately, there are several ways to do it.
If you are tech-savvy, PowerShell scripts can help you automate the entire process. A manual approach using some of the Windows built-in features is also a viable option. And lastly, some 3rd-party tools can make the file management process much simpler than writing scripts.