Copy Only Newer Files: XCopy or Robocopy or Easier Ways (2024) (2024)

Table of Contents

The need: XCopycopy only new or modified files

Xcopy is a command line utilityfor copying multiple files or entire directory trees from one directory to another and for copying files across a network. Also, you are allowed to copy only new or changed files with it. And it is used inWindows 7/8/10/11/XP/Vista and Windows Server 2003/2008/2012/2016/2019/2022.

Copying only changed files with XCopy saves much time and disk space, thus many users are willing to only copy updated files. Below is an example from it.In addition, many users use Robocopy to copy only new or modified files as it has more options.

“I copy my files from Windows 10to Server 2022 with the following command,xcopy C:\source X:\destination /s, but it copies everything. I just want to use XCopy command to copy only newer files, because these files are very large. It’s time-consuming. Is there a way to specifically just copy new or updated files without specifying a date? Any suggestion will be appreciated” – Reddit

Copy only new or changed files with or without XCopy or Robocopy

To copy only newer files in Windows 10, XCopy or Robocopy is a good choice for high-level users to perform batch operations. And It is able to backup only changed files instead of all files, even without booting into Windows.

But the problem is you need to execute this operation manually every time, which may make you feel tired and time-consuming. And it's not user-friendly to most users for its high requirement. Thus, in this article, except forXCopy or Robocopy,I'll introduce you to twoeasier ways to copy only new or changed files.

You need an all-in-one backup software - AOMEI Backupper Serverto help you out. All the operations are based on an intuitive interface, so you can easily understand and use it like a professional. It provides you with 2 helpful ways to achieve this goal and you can choose to copy files with its original structure or compress it to an image file.

👉Easier Ways to copy only newer files in Windows

Use XCopy to copy only newer files

Before using XCopy to copy only changed files, you need to learn the syntax and some parameters you will use.

✅ Syntax of XCopy command line:

Xcopy [source] [destination][/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g] [/d [:MM-DD-YYYY]] [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [{/a | /m}] [/n] [/o] [/x] [/exclude:FileName1[+[FileName2]][+[FileName3]] [{/y | /-y}] [/z] [/b] [/j]

✅Options:

  • /S Copies directories and subdirectories, unless they are empty. If you omit/s,xcopyworks within a single directory.

  • /YSuppresses prompting to confirm that you want to overwrite an existing destination file.

  • /I If in doubt always assume the destination is a folder. e.g. when the destination does not exist.

  • /E Copy folders and subfolders, including Empty folders.

  • /D:mm-dd-yyyy Copies source files changed on or after the specified date only.If you do not include aMM-DD-YYYYvalue,xcopycopies allSourcefiles that are newer than existingDestinationfiles.

  • For more options, you can type xcopy /? for all the help or referto xcopy command in Microsoft.

✅Tip: To copy only updated files with XCopy, have two options, namely using/s /d, or /i /d /y.There are some things you need to be aware of:

  • This first option will copy files that do not exist in the destination folder if you use the /d parameter without specifying a date. To avoid it, you could add the /u switch.
  • The second option will ignore the new directories by default. To copy everything, including new directories, you should add the /e switch.

Now, see below and learn the detailed steps.Note thatif there are spaces in yourdirectory names, you need to usequotes.

Step 1. Type cmd in the search box and select it.

Step 2. Type XCopy commands to copy only new or changed files. Please remember to replace the source and target path with your own. Below are some common used examples:

Example 1: Copy only updated files that are not in the destination folder.

  • set SourceDir=D:\Source
  • set TargetDir=K:\Target
  • xcopy %SourceDir% %TargetDir% /s/d

Example 2: Copy only changed files without new directories.

  • set SourceDir=D:\Source
  • set TargetDir=K:\Target
  • xcopy %SourceDir% %TargetDir% /i /d /y

Example 3:Copy changed files already exists in the destination path.

  • set SourceDir=D:\Source
  • set TargetDir=K:\Target
  • xcopy %SourceDir% %TargetDir% /s/d /u

Example 4: Copy everything including the new directory.

  • Set SourceDir=”D:\Source\copy files”
  • Set TargetDir=”K:\Target\files copied”
  • xcopy %SourceDir% %TargetDir% /i /d /y /e

Step 3. Type exit and hit Enter to leave this window.

Use Robocopy to copy only new files

Robocopy can alsohelp you copy only new files, but it has more options than Xcopy and is considered as a good alternative. Before you use it, please learn the syntax and options you may use.

✅ Syntax of Robocopy command line:

robocopy [source][destination][[file][ ...]] [options]

✅ Options:

  • /XO: is used to exclude older files, and usually done with theparameter"/maxage: n".

  • /maxage: n: indicates that the farthest modification time or the specific date, the file whose modification time or dateis older than this will not be copied.

  • /XC: Exlude changed files.

  • /XN: Exlude newer files.

  • /XN: Exlude newer files.

  • /XD dirs [dirs]: Exlude directories matching given names and paths.

  • /S:Copy subdirectories, excluding empty ones

  • /Z:Restartable mode

  • /fft:Make the modify time comparison more tolerant(2 seconds granularity)

  • /Mir:Mirrora directory tree

  • For more options, you can type robocopy /? for all the help or refer to theRobocopy command in Microsoft.

Tips:

  • To copy only changed files with Robocopy, you have two options, namely using maxage: n or /XO/maxage: n.
  • Some users say that they don't want to create all the subfolders on the target disk if there are no new files in them. In this case, you need to add an extra switch /S to exclude the empty folder.

Then, let's go through the following steps to copy only new files:

Step 1. Open the command prompt with administrator priority.

Step 2. Type Robocopy commands to copy only new or changed files. Please remember to replace the source and target path with your own.Below are some commonly used examples:

Example 1: Copy only newer or added files.

  • robocopy D:\folder1 E:\folder2 / maxage:7

or

  • robocopyD:\folder1 E:\folder2 /XO /maxage:7

Example 1: Copy new files while excluding an empty folder.

  • robocopy D:\folder1 E:\folder2 /s /maxage:7

or

  • robocopyD:\folder1 E:\folder2 /XO /s /maxage:7

Easier Ways to copy only newer files in Windows

Here you will use professional file sync or backup software -AOMEI Backupper to copy only newer files automatically and easily. AndIt provides you with 2 easier ways to complete this taskin Windows 7/8/8.1/10/11/XP/Vista, namely using Basic Sync or File Backup features.

Copy Only Newer Files: XCopy or Robocopy or Easier Ways (2024) (5)

Copy Only Newer Files: XCopy or Robocopy or Easier Ways (2024) (6) AOMEI Backupper

All-in-one Data ProtectionSoftware

  • Easily backup everything to quickly restore whatever you want.
  • 4 types of syncing modes to suit different needs,
  • Automatically synchronize files between computers or other drives.

Copy Only Newer Files: XCopy or Robocopy or Easier Ways (2024) (7) 100% Secure

Basic Sync:

🥇best for file accessibility- It allows you to keep files just as in the original folder, and you can easily access or use them after syncing.

  • Sync deleted files: By default, The basic sync does not sync deleted files from source folder to destination folder automatically. But you can set it in the Options,
  • Multiple sync modes: basic sync,real-time sync,mirror sync, and two-way sync.
  • Schedule sync: daily,weekly, monthly, event trigger, and USB plug in.

File Backup:

👍best for data security -It will compress all the files into an image file and you need to restore files from backup before using it. This greatly reduces data loss due to any unwanted access and the risk of files being corrupted or modified.

  • Diversified choices: You can choose to backup individual files or the entire folder.
  • Flexible options:By default, it will compress or split images to smaller ones.
  • Schedule backup:daily, weekly, monthly, event trigger, and USB plug in.
  • Incremental backup: It's enabled in a scheduled backup task automatically to backup only new or changed files.

#1. Sync only new or modified files just asit was

Here you will use the Sync feature to sync only changed files. Ithas 4 sync options and comes along with helpful features, such as, daily, weekly, month schedule sync. All of them hastheir own features, you can check details in the following box.

Sync modes/FeaturesBasic SyncReal-Time SyncMirror SyncTwo-Way Sync
Sync newly added or changed files. Yes Yes Yes Yes
Sync deleted files from source folder to destination folder automatically. No Yes Yes Yes
Sync changed files in real time. No Yes No No
Deleted newly added files or undo changes made in the destination folder. No No Yes No
Sync changes from source folder to destination folder, and vice versa. No No No Yes
Support schedule sync: daily, weekly, monthly, event triggers, USB plug in. Yes No Yes Yes

Then, go to the Sync tab and copy only newer files with one of them. Here Take Basic Sync as an example.

Step 1.DownloadAOMEI Backupper Server, install and launch it. Then, prepare an external hard drive or other storage as sync destination and connect it to your computer.

Secure Download

(PS: The free trial version can only be used within 30 days, to continuously protect data, please upgrade server trial now! 100$ off per one server computer.)

Step 2. Go to the Sync tab and select Basic Sync.

Step 3. Click Add Folder to selectfolders containing all the files you want to sync. Then, select the sync destination by clicking the folder-shaped button below.

Step 4. Click Schedule and Enable Schedule Sync, then select Daily, Weekly, or Monthly. To set the sync task more precisely, you can specify the backup time or intervals in the following.

⚠️In addition, you can still enjoy other helpful features:

  • Event triggers: It helps when you want to sync files at system shutdown, system startup, user logon or user logoff.

  • USB plug in: It makes syncing files between computer and flash driveflexibly, you just need to connect the USB drive when you want to sync changed files.

  • Wake the computer to run scheduled tasks: It allows you to wake up computer 2 minutes before the scheduled task start, without human intervention required.

  • Reconfigure the operation after the scheduled tasks: You can shut down restartyour computer after syncing, or simply put it into sleep or hibernate mode.

  • Sync the deletions in source directory to destination: By checking it in the Options, you can sync the deleted files as well.

Step 5. Confirm the operation and click Start Sync to sync all the files to the destination folder. Then, it will sync changed files at the next time.

#2. Safer way to copy only new or modified files

Except for Sync feature, you still can complete this task with the help of File Backup. It comes along with daily/weekly/monthly schedule backup as well asincremental or differential backup. By using it, you can still set precise backup time and intervals.

They are based on full backup, but not exactly the same. For differences,you can see from the comparison chart below.

Full BackupDifferential BackupIncremental Backup
Backup SpeedSlowestModerateFastest
Storage SpaceMostModerateLeast
Restoration SpeedFastestModerateSlowest

Also, if you want to backup files during off-peak hours, you can wakecomputerfrom sleepor hibernate mode before the scheduled tasks start. And you can Reconfigure the operation after scheduled tasks, to shut down orrestart your computer or put it into sleep or hibernate mode.

In the long run,you may worry about the backup disk full oneday. Fortunately, you can avoid this issue by deletingold backup imageregularly with its Backup Scheme feature. Normal or High compression level, Intelligent sector backups also help with this.Then, see below and learn the specific steps.

Step 1. Go to the Backup tab and selectFile Backup.

Step 2. ClickAdd FileorAdd Folderto select the files or folders you want to backup and then click OK. Then, select the prepared storage device to store your image.

Step 3(Required). ClickSchedule andselect Daily, Weekly, Monthly.Then, click Backup Scheme and selectIncremental Backup or Differential Backup under the backup method option.

⚠️In addition, you can manage the backup task with more helpful features:

  • USB plug in: To backup your files flexibly and take them everywhere, you can create a schedule backup with "USB plug in" feature. It does not require any human interference.

  • Normal or High compression level: It is able to compress image file with a smaller one, thereby saving disk space. Note the high compression level requires more backup time.

  • Intelligent sector backup: It only backs up the used sectors of the file system.

  • Backup Scheme: It offers you 3 options to delete backup files, including By quantity, By time, and By daily/weekly/monthly.

Step 4. After that, confirm all the selected settings and clickStart Backup. It will backup your files immediately and then backup only changed files at the next time.

🌟Important Tip:

With either the Sync or Backup feature, you are able to copy files to multiple locations automatically. Among them, cloud drives are one of the most popular choices, but paradoxically almost all cloud drives only offer a few gigabytes of free cloud storage, while users need to sync or back up a large number of files or folders. In this case, try Cloud Backup, you will get 1TB of cloud storage, with a trial period of 15 days.

Bonus tip

You can copy only newer files with XCopy orRobocopy, but it is really more suitable for technical people. For others, it's suggested to use professional file sync or backup software - AOMEI Backupper Standard. With it, you just need to click a few times on its prompted screen.

It allows you to make this task automatically with its daily, weekly, monthly event trigger or USB plug in schedule settings. You can choose to keep its original structure or compress it to an image file to avoid any unwanted access and malicious file corruption.

Believe me, it's one of the most powerful software to protect your data with its complete solution.To copy files from server to server within one company, you could useAOMEI Backupper TechPlus. Please download it to have a try right now!

Copy Only Newer Files: XCopy or Robocopy or Easier Ways (2024) (16)AOMEI Backupper

Best sync or backup software for Windows Server.

Download Free TrialWindows 11/10/8.1/8/7

FAQs on Command Prompt File Copy

1. Can I copy multiple files at once using Command Prompt?

Yes, you can copy multiple files at once using Command Prompt. Simply list all the source files separated by spaces after the `copy` command, followed by the destination directory. For example: `copy file1.txt file2.txt destination`.

2. What if I want to rename the copied file while copying in Command Prompt?

Command Prompt provides an option to rename files during the copy process. After specifying the source file(s) and destination location, you can add the new filename after the destination directory. For example: `copy example.txt destination\newname.txt`.

3. Are there any options to control the behavior of the file copy operation in Command Prompt?

Yes, Command Prompt offers various options to control the file copy operation. For instance, you can use `/Y` to suppress confirmation prompts when overwriting existing files, `/Z` to restart a copy operation if it fails, `/A` to only copy files with the archive attribute set, and many more. Type `copy /?` or `xcopy /?` in Command Prompt to see all available options and their descriptions.

Copy Only Newer Files: XCopy or Robocopy or Easier Ways (2024) (2024)
Top Articles
How to turn off Gmail 2FA
God of War: How to Increase Level
Printable Whoville Houses Clipart
Design215 Word Pattern Finder
Urist Mcenforcer
Fat People Falling Gif
Blackstone Launchpad Ucf
Vanadium Conan Exiles
Student Rating Of Teaching Umn
Camstreams Download
Globe Position Fault Litter Robot
Jscc Jweb
Connect U Of M Dearborn
Daily Voice Tarrytown
Sam's Club La Habra Gas Prices
Google Flights Missoula
Jinx Chapter 24: Release Date, Spoilers & Where To Read - OtakuKart
Convert 2024.33 Usd
Www Craigslist Milwaukee Wi
Lakers Game Summary
Gazette Obituary Colorado Springs
Seeking Arrangements Boston
Engineering Beauties Chapter 1
Inbanithi Age
1145 Barnett Drive
Busted Mugshots Paducah Ky
As families searched, a Texas medical school cut up their loved ones
Proto Ultima Exoplating
How to Draw a Bubble Letter M in 5 Easy Steps
Solve 100000div3= | Microsoft Math Solver
Gideon Nicole Riddley Read Online Free
Weekly Math Review Q4 3
Carespot Ocoee Photos
Telegram update adds quote formatting and new linking options
The Minneapolis Journal from Minneapolis, Minnesota
Orion Nebula: Facts about Earth’s nearest stellar nursery
Kerry Cassidy Portal
Topos De Bolos Engraçados
Electronic Music Duo Daft Punk Announces Split After Nearly 3 Decades
Mid America Irish Dance Voy
Join MileSplit to get access to the latest news, films, and events!
Craigslist Pets Plattsburgh Ny
Emily Tosta Butt
Rs3 Nature Spirit Quick Guide
Expendables 4 Showtimes Near Malco Tupelo Commons Cinema Grill
Love Words Starting with P (With Definition)
Swsnj Warehousing Inc
6463896344
The Plug Las Vegas Dispensary
How To Find Reliable Health Information Online
La Fitness Oxford Valley Class Schedule
Latest Posts
Article information

Author: Mrs. Angelic Larkin

Last Updated:

Views: 5556

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Mrs. Angelic Larkin

Birthday: 1992-06-28

Address: Apt. 413 8275 Mueller Overpass, South Magnolia, IA 99527-6023

Phone: +6824704719725

Job: District Real-Estate Facilitator

Hobby: Letterboxing, Vacation, Poi, Homebrewing, Mountain biking, Slacklining, Cabaret

Introduction: My name is Mrs. Angelic Larkin, I am a cute, charming, funny, determined, inexpensive, joyous, cheerful person who loves writing and wants to share my knowledge and understanding with you.