Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Command Prompt - Windows 11, 10, etc. ► ««« »»»

Copy only the directory structure and not the files!


The solution with XCOPY under Windows is very easy to copy directory structure without files on Windows 11, 10, ... and MS Server OS!




Here is the command:


xcopy.exe "C:\From_Folder" "C:\Destination_Folder" /t /e


I have also described this for use in Q-Dir. But you can also use without Q-Dir. However, one must always manually enter the source folder and destination folder. It's not that bad!

Read this  ► synchronize directories in Q-Dir whit xcopy.exe!

Here is the overview of the XCOPY arguments or PARAMETERS!



ColorConsole  [Version 1.5.1000]
Microsoft Windows [Version 6.3.9600]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\$WINDOWS.~BT>xcopy /?
Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
                 [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
                 [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B] [/J]
                 [/EXCLUDE:file1[+file2][+file3]...]

source       Specifies the file(s) to copy.
destination  Specifies the location and/or name of new files.
/A           Copies only files with the archive attribute set,
     doesn't change the attribute.
/M           Copies only files with the archive attribute set,
     turns off the archive attribute.
/D:m-d-y     Copies files changed on or after the specified date.
     If no date is given, copies only those files whose
     source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]...
     Specifies a list of files containing strings.  Each string
     should be in a separate line in the files.  When any of the
     strings match any part of the absolute path of the file to be
     copied, that file will be excluded from being copied.  For
     example, specifying a string like \obj\ or .obj will exclude
     all files underneath the directory obj or all files with the
     .obj extension respectively.
/P           Prompts you before creating each destination file.
/S           Copies directories and subdirectories except empty ones.
/E           Copies directories and subdirectories, including empty ones.
     Same as /S /E. May be used to modify /T.
/V           Verifies the size of each new file.
/W           Prompts you to press a key before copying.
/C           Continues copying even if errors occur.
/I           If destination does not exist and copying more than one file,
     assumes that destination must be a directory.
/Q           Does not display file names while copying.
/F           Displays full source and destination file names while copying.
/L           Displays files that would be copied.
/G           Allows the copying of encrypted files to destination that does
     not support encryption.
/H           Copies hidden and system files also.
/R           Overwrites read-only files.
/T           Creates directory structure, but does not copy files. Does not
     include empty directories or subdirectories. /T /E includes
     empty directories and subdirectories.
/U           Copies only files that already exist in destination.
/K           Copies attributes. Normal Xcopy will reset read-only attributes.
/N           Copies using the generated short names.
/O           Copies file ownership and ACL information.
/X           Copies file audit settings (implies /O).
/Y           Suppresses prompting to confirm you want to overwrite an
     existing destination file.
/-Y          Causes prompting to confirm you want to overwrite an
     existing destination file.
/Z           Copies networked files in restartable mode.
/B           Copies the Symbolic Link itself versus the target of the link.
/J           Copies using unbuffered I/O. Recommended for very large files.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.

C:\$WINDOWS.~BT>



FAQ 18: Updated on: 26 August 2023 09:27 Windows
Windows-Console

Run an Application with a Specific CPU Priority!


Programs with a certain process priority can be started via the Windows command prompt cmd.exe with the START command The system treats programs with
Windows-Console

Driver query from the command prompt in Windows (10, 8.1, 7)!


Drivers are one of the most important software installed on a Windows PC. No matter if its Windows 11, 10, 8.1, or the old Windows 7 + MS Server OS Improperly
Windows-Console

Save and Restore Wi-Fi settings in Windows (11, 10, 8.1, 7)!


The solution is extremely easy to save and restore the Wi-Fi settings in Windows 11, 10, 8.1, 7 Restoring the Wi-Fi settings after reinstalling the Windows
Windows-Console

Formatting via the Command Prompt Windows 11, 10, 8.1 , ...!


The Format command prompt command is this one that you can use to format a partition on a hard disk, or USB disk Tip: You can also format drives without
Windows-Console

Identify network problems with Windows Command Prompt (11, 10, 8,1, 7)!


The tracert command tracks the route a package needs to reach a destination and displays information about each hop on that route. For example, start tracert
Windows-Console

Command prompt, change CMD settings, color, font, ...?


An example If you want to change the color, font and width of the command prompt and do not like the default settings on Windows 11, 10, and MS Server
Windows-Console

Command to restart programs via command prompt?


With the CMD command you can quite quickly quit programs and applications and restart on Windows 11, 10, and MS Server OS There are also tools for such

»»

  My question is not there in the FAQ
Asked questions on this answer:
  1. Copy commandline directory structure?
  2. Xcopy file or directory cmd?
  3. Windows command prompt copy directory xcopy?
  4. Copy Windows 10 Explorer folder structure?
  5. Copy cmd.exe again system32?
  6. Copy directory tree?
  7. Copy folder structure in dos?
  8. Directory structure cmd?
  9. Copy file with directory structure?
Keywords: windows, 11, 10, server, eleven, console, copy, only, directory, structure, files, solution, with, xcopy, without, command, Questions, Answers, Software




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + 3D.Benchmark.OK
  + PhotoResizerOK
  + Office.Files.Images
  + Film.Strip.Explorer
  + WinScan2PDF
  + DontSleep
  + ExperienceIndexOK
  + QuickTextPaste
  + DesktopNoteOK
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | gc24b | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu


► What is the Search Results folder in Windows 12, 11 and 10? ◄
► What does it mean to switch between monitor modes? ◄
► Is the Aero Desktop Clock for Android or Linux, Ad Free? ◄
► Help with Notepad in MS Windows 11, 10, ...? ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....