Windows CMD Copy Command


CMD Copy Command 

in this article your going to learn copy commands but remember to practice all of commands with your windows computer.

Copy a Single File

To copy a single file from one location to another:

bash
copy C:\path\to\file.txt D:\path\to\destination

Example:

bash
copy C:\Users\John\Documents\file.txt D:\Backup


Copy Multiple Files

To copy all files of a specific type (e.g., .txt files):

bash
copy C:\path\to\*.txt D:\path\to\destination

Example:

bash
copy C:\Users\John\Documents\*.jpg D:\Photos


Copy a Directory

Use the xcopy command to copy entire folders:

bash

xcopy [source_folder] [destination_folder] /E /H /C /I

Flags:

  • /E: Copy all subdirectories (including empty ones).
  • /H: Copy hidden and system files.
  • /C: Continue even if errors occur.
  • /I: Assume the destination is a directory.

Example:

bash
xcopy C:\Users\John\Documents D:\Backup /E /H /C /I

Post a Comment

0 Comments