cmd

Using xcopy command

Introduction#

Xcopy, copies files and directories, including subdirectories.

Parameters#

Parameter Details
/h Copies files with hidden and system file attributes. By default, xcopy does not copy hidden or system files.
/r Copies read-only files.
/s Copies directories and subdirectories, unless they are empty. If you omit /s, xcopy works within a single directory.
/y Suppresses prompting to confirm that you want to overwrite an existing destination file.
/D Orders CMD to only copy files that are newer than their destination opposite.

Copying multiple files including tree structure

If you want to xcopy files with specific type to a new folder keeping the current folder structure you need only to do this

xcopy [SourcePath]*.mp3 [DestinationPath] /sy


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow