Copy Command In Windows Server 2008

In this article I will discuss about the Copy command in Windows Server 2008 and how it works.
  • 3571

Introduction

Copy command applies to all versions of Windows. Copy command is used to copy one or more than one file from one location to another. Copy command simply copies or combine files.

Copy command syntax

copy [/d] [/v] [/n] [/y] [/-y] [/z] [/l] [/a| /b] source [/a| /b] [+source[/a|/b][+...]] [destination[/a|/b]]

Parameters

Parameters of copy command Description
/d Allow encrypted file  to be saved at the destination in decrypted form.
/a Denotes a ASCII text file.
/b Denotes a binary file.
/v Verifies that the new files are written correctly.
/n Uses a short file name, if available, when file is copied whose name contains more than 8 characters, or with a file name extension longer than three characters.
/y Forcibly prompts to confirms that you want to overwrite file which already exists at destination.
/-y Promts to confirm that you want to overwrite file which already exists at destination.
/z copies networked file in restartable mode.
/a Indicates a ASCII text file.
/b Indicates a binary file.
source Specifies the location of file or set of files to be copied.
destination Specifies the location to which you want to copy a file or set of files.

Example of copy command

Copy file named report.txt located in D: drive to existing folder named inventory located in E: drive.

copy D:\report.txt E:\inventory

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.