Backing up specific important folders, files and documents in Windows 11 does not require expensive third-party software if you know how to use the command line.
Microsoft Windows 11 contains several features and applications for backing up system files, but very few for backing up specific important user-created files and folders. In general, this is because Microsoft wants users to enjoy the benefits of: A disc and their other cloud apps in it azure blue†
But what if you can’t connect to the cloud and still need to back up important files?
SEE: How to secure your email through encryption, password management and more (Tech Republic Premium)
Many years ago, when PCs ran on DOS and command-line interfaces, users used a file copy and move application called xcopy. This pre-Windows app is still available in the Windows 11 command-line structure, but the mysteries of how it works have been lost for many by the allure of the modern graphical user interface.
How to use xcopy
The purpose of the xcopy application is relatively easy to understand: Copy or move files and folders from one location to another. Complications arise from the various parameters and switches available in even the simplest xcopy command. The basics of the xcopy command are outlined in this excerpt from: Microsoft Docs†
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]
As you can see the xcopy command line can get very complicated very quickly depending on what you would like to do. Many IT professionals made a career out of their ability to create batch DOS files that could back up files and move them to more secure storage devices.
Our example xcopy command will be much simpler and clear. We are going to create an xcopy command that will copy all the files and subfolders in your default Windows 11 Documents folder to a USB stick.
The first hurdle we must overcome is the full path to our source. The xcopy app only responds to valid input, so we have to be precise.
If you open Windows Explorer and navigate to your source folder – in our example that is the Documents folder for the current user – and right-click on the address string, as shown in figure A, you will be given the option to copy the path as text to the Windows 11 clipboard.
Image A
For our example, that path is:
C:\Users\mark\Documents
Our destination path is a folder on the USB stick named E:\Backup
†
To make sure that we copy the Document folder and all the files and subfolders it contains to the USB stick, we use these parameters:
/s
– Copies folders and subfolders unless they are empty. if you leave out/s
xcopy works within a single directory./v
– verifies every copied file and folder./a
– copies files with the archive attribute set (archived files are copied).
With those parameters, our xcopy command looks like this:
xcopy C:\Users\mark\Documents E:\Backup /s /v /a
To use the xcopy app, type cmd in the Windows 11 desktop search and select the Command Prompt app from the list of results. Type or paste the xcopy command into the prompt and press Enter.
Depending on the number of files, the process may take a few seconds or a few minutes. Figure B shows what our simple example command looks like.
Figure B
When you compare the source folder with the destination folder after running the xcopy app as shown in Figure C, you can see that we copied the correct files and folders, omitting the empty folder. If we wanted to include the empty folder, we would add the . can add /e
switch to our command.
Figure C
The xcopy command works, of course, depending on the destination location, even if you don’t currently have internet access. The xcopy command also doesn’t limit the number of folders or files, nor the size of those files – it just copies everything it needs to copy. This can be a powerful tool to deploy to a close batch file when you want to save documents to a removable storage device at the end of each work session.