Xcopy
Xcopy stands for ‘extended copy’ is a command line utility that can copy multiple files or directories from the source path to the other destination directory. It supports a special switch /t, which will allow you to replicate the same structure in the destination without copying the files. The only issue is that it will ignore empty folders. To solve it, you need to combine it with another switch /e.
To Copy Folder Structure without Copying Files in Windows 10,
- Open a Command Prompt.
- Type
xcopy "source" "destination" /t /e
. - Replace
source
with the path that contains your current folder hierarchy with files. - Replace
destination
with the path that will store the empty folder hierarchy(the new one).
Example:
xcopy "C:\Folder" "D:\Folder" /t /e
^It will duplicate the C:\Folder structure in D:\Folder.
An alternative solution is a third-party app XXCopy.
XXCOPY
XXCOPY is a third-party command line tool. You could consider it as an extended version of XCopy which supports 230 command line arguments! It supports all modern Windows version, including 32-bit and 64-bit of Windows 10.
XXCOPY works great when you need to copy the folder structure with a hierarchy level limit. For instance, you can copy the first 3 levels of your folder structure by using switch /DL<n>.
Also, XXCOPY can duplicate your folder hierarchy with file system permissions. This great option allows saving hours of work for large subfolder structures.
XXCOPY has a freeware package which is free for personal use.