By Delia / Last update December 13, 2021

How to auto copy files from one folder to another?

If you simply want to transfer files from one folder to another, just copy them manually. But what if these files are modified frequently and you want to keep a latest copy?

Generally, you can create a batch file with command lines, and use Windows Task Scheduler to copy files to another folder or even mapped network drive on regular basis. I will explain how to do it in the following article.

If you find this method can hardly meet your needs, or you want an easier solution with intuitive GUI, you can also try the alternative below.

robocopy

Create scheduled task to copy files to another folder

To begin with, the most commonly used command lines to copy files & folders are xcopy and robocopy. I will use robocopy here because it’s a more robust replacement of xcopy.

Step 1. Now you need to create a .bat file with a text editor, notepad for example. You can right-click on the desktop and choose New > Text Document.

Step 2. Open the text document and type the command. The basic syntax for robocopy is:

robocopy [source] [destination]

You can fill in the source directory and target directory as you want. For instance, I want to copy files from desktop to D drive, and then my command is:

robocopy C:\Users\Delia\Desktop\copy D:\copy

If you want to transfer other files between other source and target directories simultaneously, just add another command line in the notepad according to your needs.

In addition, you can add some switches to customize the file copy, like /s to copy subdirectories and excludes empty directories, /xo to excludes older files, and /mov to move files to another folder while deleting them from the source folder. Here’s a full list of robocopy parameters you could refer to. Select and combine them appropriately, you can accomplish a lot of wonderful things.

What’s more, if you want to receive a message after completing file copy, and press any key to exit, you can use the echo and pause commands. For example:

@ECHO OFF
ECHO Copy completed!
robocopy C:\Users\Delia\Desktop\copy D:\copy /s /z
robocopy C:\Users\Delia\Desktop\copy1 D:\copy1 /s /z
PAUSE

By this script, the “copy completed” message will display after the files being copied to the target directories, and the cmd window will pause until I press any key to continue.

Step 3. Click File > Save As… and give the file a name, then change the extension from .txt into .bat and Save it.

This will create a batch file which you can double-click it to run the commands. Furthermore, you can create a scheduled task with Windows Task Scheduler to copy or move files to another folder automatically.

You can also create robocopy scheduled task by parameters. For instance, /MOT:m will execute another incremental backup if changes are detected in "m" minutes.

save bat file

Step 4. Open Control Panel and view it by large icons or small icons, then choose Administrative Tools > Task Scheduler. Alternatively, you can directly search for it.

Choose Create Basic Task… on the main interface, and follow the wizard to make your choice.

create basic task

You can enter the task name and description, choose how to trigger the task. If you want to create a scheduled task to copy files to another folder every day, just choose Daily and set up the specific time point at the next page.

choose schedule

Choose how you want the task to perform. Here select Start a program and browse for the .bat file you just created.

start a program

Confirm all the settings and click Finish to schedule the file copy task. You can find it in the Task Scheduler Library afterward, and feel free to edit or delete it.

How to schedule task to copy files to network drive?

When you use Task Scheduler to copy files to or from a mapped network drive, you may find it doesn’t actually work. If so, check the security options of the task in Task Scheduler Library.

Task Scheduler can only access mapped network drives with the option “Run only when user is logged on” enabled. If not, please right-click the task, choose Properties to modify the settings.

security options

Easier alternative: auto copy files to other location via freeware

The combination of robocopy and task scheduler gives you the flexibility to achieve many different purposes, but it also requires a certain level of computer knowledge. If you want a more intuitive solution with equally powerful data protection features, try AOMEI Backupper Standard.

This freeware works on Windows 10/8.1/8/7/Vista/XP and allows you to copy files between internal/external disks, flash drives, network locations and cloud drives. Thus you can easily sync local folder to network, sync network folder to One Drive or even sync folders between computers.

This software enables you to create a scheduled task within 3 steps to copy files to another folder automatically. If you want any changed files to be synchronized instantaneously without a schedule, you can upgrade to Professional edition to enjoy Real-Time Sync.

Now, download the software to copy files:

Download Freeware Win 10/8.1/8/7/XP
Secure Download

How to schedule task to copy files to another folder:

Step 1. Open the software, select Sync on the left side, and choose Basic Sync to sync changed files from source directory to target directory.

basic sync

Other sync modes (available in Pro or higher editions):
Real-Time Sync: Sync changed files from the source folder to the target folder in real time.
Mirror Sync: Keep the files in target folder exactly the same as in source folder.
Two-Way Sync: Sync changed files in source folder and target folder to the other side mutually.

Step 2. Click Add Folder to specify what you want to copy, then click the destination bar to select the target path.

To copy files from a network location, you can click Share/NAS > Add Share or NAS Devices to specify a path. To copy files to a network location, you can choose Select a network location from the drop-down menu. As for a mapped network drive, you could select it directly just as local drives.

select directory

Step 3. Click Schedule to set up automatic file copy, and click Start Sync to execute the scheduled task.

Schedule options include Daily/Weekly/Monthly/Event triggers/USB plug in. The last two requires Pro edition.

scheduled sync

Supplement: backup files to another folder as images

By Basic Sync, you can create an intact copy with original folder structure and file formats. The copied files can be accessed and used directly, but if you make some mistakes to the source folder and the changes have been copied to the target directory, you will not be able to restore the files to an earlier version.

In AOMEI Backupper, you can also back up files/partitions/OS/disk to compressed image files, and set up a schedule to implement it automatically. The backup images cannot be used without restoration, but you can therefore keep different version of data, so as to restore it to any earlier version.

To do it, just go to Backup tab and choose the option you need. Also, you can do incremental or differential backup to save only changed files and therefore save storage space.

backup

Conclusion

Windows enables you to create scheduled task to copy files to another folder regularly, but this requires you to learn about xcopy/robocopy commands and Task Scheduler in advance. For convenience, you can also use professional software like AOMEI Backupper.

In addition to file backup and file sync, it can do many other things for data management and protection. Even if you need to handle more complex data, like transfer OS to another hard drive, you can use the Disk Clone or System Clone feature. Also, it has different versions for different groups, including a Server edition for Windows Server users.