Whether you're deleting your downloads or organizing your tax receipts, you can use these simple techniques to automate the process.
Do you want to automatically move files from one folder to another on your Windows or Mac computer? Well, you can do it on either type of computer pretty easily.
This guide will show you how to automate your file transfer tasks on Windows and macOS.
Why move files automatically from one folder to another?
There are many reasons you might want to set this up.
Your download folder may get crowded every few days. In this case, you can set up a task that will automatically move your files to a selected folder. This helps to keep the download folder clear.
Another possible reason is that you have a folder where you save files, but you won't be using them when you're done editing. Instead, you can set up a rule to automatically move files from this folder to an archive folder on your computer.
Automatically move files from one folder to another on Windows
On Windows, you can create a batch script that will automatically move files from the selected source folder to the destination folder. This script can check the ages of your files to make sure your files are not moved until certain days or months have passed since they were created.
Don't worry if you've never written a batch script before. To script this task, all you need to do is copy and paste the following code, specify your folders, and you're good to go.
This is how you do it.
Step 1. Write the script to automatically move files
The first thing you need to do is write the script and supply some values in it:
Open that begin Menu, look for notepadand start it.
Paste the following script into a new editor document.
set X = days
set "source = SourceFolder"
set "destination = DestinationFolder"
Robocopy "% source%" "% destination%" / mov / minage:% X%
Exit / b
Replace in the script above Days Replace with the number of days after which you want the script to move your files (this is the age of your files) Source directory with the path where your files are located and replace Destination folder with the path where you want your files to be moved.
Press the file Menu and choose Save as.
Choose All files of the Save as Enter the drop-down menu, enter a name for your file, and attach it .Bat in the end in the Filenames Field and click save up to save the file.
Your batch script is now ready.
Step 2. Schedule the batch script to run automatically
Double-clicking your newly created batch file should move all of your files from one folder to another. To automate this task, you must include this file in an automated task.
The task planner will help you with this. You can create a task in this utility app and ask them to run your script according to the schedule you choose.
How to set up your task in the task scheduler:
Open that begin Menu, look for Task plannerand open it.
click Create task right to configure a new automatic task.
Enter a name for your task in the field Surname Field.
Press the Triggers Click the tab at the top, then click New to add a new trigger.
In the trigger screen, select how often you want your batch script to run over the settings Section. You can then specify the time at which the script should be started in the right-hand area. Then click okay below.
Choose Actions Tab and click New to add a new action.
Assure yourself Start a program is selected in the action Drop down menu. Then click on Search Button.
Navigate to the location of your batch script and select it.
click okay and then okay again to save your task.
The Task Scheduler will run your batch script at the specified time and frequency. In this case, the script will move files from your source folder to your destination folder.
If you ever want to turn off automatic moving of your files, open Task plannerFind your task in the list and click on Clear On the right side. This will delete your task and prevent the batch script from running automatically.
Automatically move files from one folder to another on macOS
Setting up an automatic file transfer is relatively easy on macOS. This is because you only have to use one app to write and schedule your script on a Mac.
We're talking about the Automator app, which is a great way to automate many tasks on your Mac. With this app you can create a folder action that moves your files from one folder to another without additional user interaction.
If this sounds interesting to you, here's how to automate the process of moving files on your Mac:
Start Automator on your Mac.
click File> New, choose Folder actionand hit Choose to create a new folder action in Automator.
You will see a drop down menu that says Folder action receives files and folders that have been added above. Use this drop-down list to select the source folder that contains the files you want to move.
On the left side of your screen where it says ActionsLook for the mentioned action Move Finder Items and drag and drop it onto the workflow on the right.
By doing Move Finder Items Action on the right, select the destination folder from the To Drop down menu. This is where your files will be moved.
Tick Replace existing files if you want.
Press Command + S.Enter a name for your folder action and click save up.
From now on, Automator will move the file to the destination folder whenever you drop a file in your source folder. There's no need to press buttons or launch utilities. it all happens by itself.
When using this Automator task, be careful with your Downloads folder. This is because most browsers save temporary versions of the files that are still being downloaded. Automator moves these half-downloaded files. This can cause your downloads to fail.
One band aid to this problem is to make your desktop the default download folder for your browsers if you want.
Move files to appropriate folders on Windows and Mac
If you tend to follow a certain pattern to move your files around, you can automate this task on Windows and Mac computers as shown above.
Organizing files has never been easier, but there are now apps to help you with this task. These apps help you better manage and organize your files so that you can easily find your files when you need them.
6 Windows apps that organize files for you automatically
Organizing files on Windows is a daunting task. Check out these automatic file organizing apps that will do it for you.
About the author
(102 articles published)
Mahesh is a tech writer at MakeUseOf. He has been writing technical guides for about 8 years and has covered many subjects. He loves teaching people how to get the most out of their devices.
From Mahesh Makvana
Subscribe to our newsletter
Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive deals!
One more step …!
Please confirm your email address in the email we just sent you.