Here’s how you set up your task in Task Scheduler: You can create a task in this utility app, and ask it to run your script according to your chosen schedule.
Task Scheduler is going to help you with that. To automate this task, you need to put this file into an automated task.
Schedule the Batch Script to Run Automaticallyĭouble-clicking on your newly created batch file should move all your files from one folder to another. bat at the end in the File name field, and click Save to save the file. Select All Files from the Save as type dropdown menu, enter a name for your file, append. In the script above, replace Days with the number of days after which the script should move your files (this is the age of your files), replace SourceFolder with the path to where your files are located, and replace DestinationFolder with the path to where your files should be moved to. Robocopy "%source%" "%destination%" /mov /minage:%X% Paste the following script in a new Notepad off Open the Start menu, search for Notepad, and launch it. The first thing to do is to write the script and specify some values in it: Write the Script to Automatically Move Files
HOW TO MAKE A NEW FILE FOLDER ON THE DESKTOP CODE
In fact, to make a script for this task, all you need to do is copy and paste the code below, specify your folders, and you’re good to go. This script can check the age of your files to ensure your files are only moved after certain days or months have passed since they were created.ĭon’t worry if you’ve never written a batch script before.
On Windows, you can create a batch script that automatically moves files from your selected source folder to your target folder. Automatically Move Files From One Folder to Another on Windows