Menu
Pinkesh's Notes
  • Home
  • Crossword
  • Technology
  • Site Map
  • Contact Me
  • About Me
Pinkesh's Notes

HICKERY – xcopy Command

Posted on January 4, 2019January 5, 2019 by jainpinkesh

Tired of all the prompts while copying files? Here is a better/efficient way to copy files around. This command is especially helpful when copying tens of gigabytes of files, for example backing up your c drive into an external hard drive.

Here we have some files in the source folder:

You can use the following steps to copy files:

  1. Run command prompt as an administrator.
  2. Type the copy command as follows: xcopy c:\sourcefolder c:\targetfolder /h/i/c/k/e/r/y

Explanation of the options:

  1. /h: Copies hidden and system files, which, xcopyy does not do by default.
  2. /i: If destination directory does not exist, xcopy creates new directory. Then it copies all files into new directory. It suppresses the prompt to see whether target is a file or directory.
  3. /c: This parameter ignores errors.
  4. /k: Retains read-only attribute on target files if it is present on source files. xcopy removes read-only by default.
  5. /e: This parameter ensures that all the
    sub-directories are also copied even though they are empty.
  6. /r: Copies read only files.
  7. /y: This parameter suppresses prompting to confirm that you want to overwrite an existing destination file.

After running the above command, you will see the TargetFolder as follows:

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • VueJS: Call child component’s method from a parent
  • VueJS: Unknown custom element
  • VueJS: Pass data from child component to parent component.
  • Economics – 12th HSC
  • Thoughts and It’s effects

Categories

  • Crossword
  • General
  • Technology


©2025 Pinkesh's Notes | WordPress Theme by Superb Themes