By Ivy / Last Updated May 18, 2021

Quick navigation:

Need to backup files from command prompt in Windows 10

It goes without saying, file backup is important for computer users to prevent data loss, after all, unexpected errors can happen at any time, for example, Windows updates issue, virus attack, file system error, file corruption, system crash, hard disk failure etc. 

Then, you may wanfer how do I backup files from command prompt in Windows 10? There are 4 common used tools to help you backup files using cmd, namely, Robocopy, XCopy, SDCLT, Notepad. Also, this article provide you 2 easier ways to backup files. Please continue to see below and learn more.

How to backup files from command prompt in Windows step by step?

Here in the part you will learn to backup files using cmd within Windows, 4 methods in total, namely, using Robocopy, XCopy, SDCLT. Get the one you like. If you are not familar with command line, you could consider using GUI-based backup software. It has an intutive interface, so you can easily understand it and operate like a professional, the same is true for novices.

Method 1: Backup files from Robocopy command prompt in Windows 10

Robocopy(also named as Robust File Copy) is a command-line directory and/or file replication command for Microsoft Windows, providing more than 80 command-line parameters and switches, so you can copy any files or folders you want. Also, it's supported in Windows Vista/7/8/10 and Windows Server 2008/2012(R2)2016/2019.

Before you start to copy files using command prompt in Windows 10, you need to learn some parameters for future use. Any unexpected error may result in data loss, it's suggested to backup files if necessary.

  • To get Robocopy command line option, you can type "Robocopy /?".

Robocopy Command

  • In addition, you still need to learn syntax for Robocopy command line, it's¬†robocopy¬†source¬†destination [file[file]...]

Example to backup files using Robocopy: 

Here take backup user profile C:\Users\William to a FileBackup folder on an external hard disk(H:) as an example, you are supposed to type as follow.

Robocopy "C:\User\William" "H:\FileBackup" (You'll, of course, replace the path and name with your own.)

If you don’t want to backup the hidden system files, you can use "/XA:SH" option and type as follow. 

robocopy "C:\User\William" "H:\FileBackup" /XA:SH

Note: Robocopy can be a good helper in most cases, but it will not work if there are any open files. And the /NP option to disable reporting of the progress percentage for files is ignored if you try to enable multithreaded copying using the /MT[:n] option. 

Method 2: Copy files using XCopy command prompt in Windows 10 

XCopy is used to copy multiple files or entire directory trees from one directory to another over network. It's first introduced in DOS 3.2 and later inherited in new operating system, such as, Windows 10. But Microsoft thinks Robocopy is a more powerful tool and has great compatibility.

Command line is complicated for most users, it's worth to pay more attention. Thus, it's suggested to learn parameters and syntax you will use.

  • To get the parameters of XCopy, you can type "XCopy/?".

  • The syntax is xcopy¬†source¬†destination [file[file]...]

Example to Copy files using XCopy: 

To create a new directory including all contents of the existing directory, any files or subdirectories having the "hidden" or "system" attributes and empty directories, you are supposed to type as follow.

xcopy  "C:\User\William" "C:\User\NewFolder" /e /i /h

Note: Like Robocopy, XCopy does not copy open files as well. And the filename is limited to 254 characters, otherwise the command line will fail with "insufficient memory" error. In addition, copying larger files without the "/J" option (available only after server 2008 R2) will take up all available RAM on a system.

Method 3: Backup files using SDCLT command prompt in Windows 10

SDCLT is also a command line utility that can help you backup specific files you want. It is located in the folder C:\Windows\System32, you can directly use it in the command prompt window.

To create an incremental backup silently, type the first command in the following. If you want details, you can use the second command line.

sdclt.exe /KICKOFFIOB

cmd /c sdclt.exe /KICKOFFJOB & sdclt.exe /UIMODE /SHOW

Backup Files using SDCLT

To create a differential backup without prompt, use the first command below. If you want to get details, you can copy and paste the second command.

sdclt.exe /KICKOFFNEW

cmd /c sdclt.exe /KICKOFFNEW & sdclt.exe /UIMODE /SHOW

Method 4: Backup files using notepad CMD 

Notepad is not a real command line utility, but sometimes you need to open it using cmd and then copy files you want. For example, if you computer fail to boot and you don't know the specific path of files you want, you need to open notepad in the recovery environment and use its "Save as" feature to find the files and copy it.

Please prepare Windows 10 recovery drive or installation disc to boot your computer if your computer is unable to boot, you can use installation disc and notepad command prompt to backup files in Windows 10.

To backup data without booting Windows 10, you need to prepare Windows 10 recovery drive or installation disc to boot your computer. If you don't have any one, you can download media creation tool from Microsoft and then create one manually. Then, follow the steps below.

Step 1. Insert installation disc into your computer and boot from it. 

Restart your computer, press specific key (usually¬†F2¬†or¬†ESC) on the initial screen and go to BIOS, select¬†Boot¬†option and move¬†CD/DVD¬†to the first place by clicking ‚Äú+‚ÄĚ, then press ‚ÄúF10‚Ä̬†to boot your computer.

Bios

Step 2.¬†Press a key¬†when you see ‚ÄúPress any key to boot from CD or DVD‚ÄĚ.

Step 3.¬†In the first Windows Setup screen, press ‚ÄúShift + F10‚Ä̬†to open command prompt.

Step 4.¬†Type ‚Äúnotepad‚Ä̬†in the command prompt and hit ‚ÄúEnter‚ÄĚ.

Step 5. Then, you will see a pop up window, click ‚ÄúFile‚Ä̬†and ‚ÄúSave as‚ÄĚ to find your files.¬†

Backup Files using Notepad

Step 6. Plug your USB drive into computer and be sure it's recognized. Then, right-click the files you want to backup > click ‚ÄĚSend to‚ÄĚ > select the USB drive as backup destination.¬†

2 easier ways to backup files and folders 

Method 1: Backup files and folders easily in Windows 10

As mentioned earlier, cmd is not easy to operate, and any human error may result in data loss. Thus, it's suggested to backup files with GUI-based free backup software AOMEI Backupper Standard. Here are some of its obvious advantages:

  • Versatile backup and restore software: It supports file backup, system backup, disk backup and partition backup, so you can backup any items you want.

  • Multiple backup settings: It's capable of backing files daily/weekly/monthly. More surprising, it supports backing up changed files or folders using¬†incremental backup or differential backup.

  • Have great compatibility in operating system and storage device. It supports Windows 10/8/7/XP/Vista, and allows you to backup files to external hard drive, USB flash drive, network drive, NAS etc.

Why not give it a try right now? Click the download button below to install it on your computer. 

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

Step 1. Launch free backup software AOMEI Backupper Standard, then select ‚ÄúBackup‚Ä̬†and ‚ÄúFile Backup‚ÄĚ in order.

File Backup

Step 2. ¬†click ‚ÄúAdd File‚Ä̬†or ‚ÄúAdd Folder‚ÄĚ to select files or folders to be backed up.¬†

Add Folders Files

Step 3.  Click where the arrow point to select a destination path for your files. If  you want to copy files to external hard drive in Windows 10, you need to connect it in advance.

Select Destination

Step 4. Then, things have done half, you just need to click "Start Backup" to complete this task. But before that, it's suggested to set one or more backup settings in "Options" or "Schedule" per your need.  

Options: You can comment on this task for clearly distinguish, compress file backup image with normal or high compression level, set pre/post command, etc.

Schedule: You can select a specific backup interval to schedule backup files, such as, daily incremental backup, so you will never miss any change. 

Schedule Settings General

Note: Backup Scheme can help you delete old backups, but it's available on the professional version at least. You need to upgrade the free version of AOMEI Backupper before using it.

Except for GUI-based interface, this software also can be a command line utility. Thus, you can create data backup using cmd, clone hard drive from command prompt, repair Windows 10 using command prompt, etc.

 

Method 2: Backup data without booting into Windows 10

To backup files without booting into Windows 10, you need a bootable media to start Windows. This software provides you two useful ways, namely Create Bootable Media, Recovery Environment, you can choose one of them per your needs.

>> If you have extra storage device, such as, USB or CD/DVD, you can use Create Bootable Media.

>> If you don't have any storage device, you can use Recovery Environment. It allows you to add an entry to your computer, so you can directly boot from it without extra steps. 

To create bootable USB, launch AOMEI Backupper Standard and then click Tools > Create Bootable Media. After that, you will be asked to select bootable disc type and storage media, select them per your needs and click Next to start the creation. 

Create Bootable Media

Note: To enjoy all the useful feature of this software, it's suggested to select Windows PE as bootable disc type.

To create recovery environment, go to the main page of Tools, select Recovery Environment and tick the option Enable the boot option of AOMEI Backupper recovery environment. Then, you will be told that this entry will take effect upon next startup, click OK and it will start the creation.

Tools Recovery Environment

To backup data without booting into Windows, you need to boot from bootable media or recovery environment. The steps are:

If you create bootable media, you need to change boot priority for your bootable USB or CD/DVD and boot from it. 

Change Boot Priority

If you you create recovery environment, just start your computer as normal, select Enter into AOMEI Backupper.

Enter Into Aomei Backupper

Wait for a while, and you will see the main page of this software. Then, backup files as you are in the normal Window 10.

Wrapping things up

That's all for how to backup files from command prompt in Windows 10. If your computer is not bootable, you still can choose to backup data without booting Windows 10. No matter what your situation is, there is always a way for you. Please select one per your needs.

In addition, it's suggested to keep AOMEI Backupper Standard on your computer for future backup. It supports schedule backup files/system/disk/partition, so you can restore file or system using the lastest backup in the event of a disaster.