By Ivy / Last Updated March 17, 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, 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 toolsto help you backup files using cmd, namely, Robocopy, XCopy, SDCLT, Notepad. 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, 3 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 backup files, 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.


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.

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 use safe way. Here I strongly recommend you backing up files with GUI-based free backup software AOMEI Backupper Standard because of the following advantages:

  • Versatile backup and restore software: It supports file backup, system backup, disk backup and partition backup.

  • 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 it's an external hard drive or USB drive, please 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

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. Here you can create bootable media or recovery environment first with AOMEI Backupper Standard and then backup data.

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, boot mode, and storage media, just select them per your needs. To enjoy all the useful feature of this software, it's suggested to select Windows PE as bootable disc type.

Create Bootable Media

To backup data using bootable media, please follow the steps below.

Step 1. Connect the bootable media and boot from it. Then, press a key to access AOMEI Backupper Standard when prompted.

Step 2. Wait for a while, and you will see the main page of this software when the file loading process is completed.

Step 3. Follow the steps to backup files within Windows 10. It's all the same.

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.