UncleCoder.com

UncleCoder.com

Free programming examples and instructions

HOW TO : Copy a File or Folder in Basic DOS Commands

How to copy a file or folder using basic dos commands

by MUHAMMAD FAIZAL N S


Posted on 07 Aug 2017 Category: DOS Views: 454

Edited on 07 Aug 2017


Syntax of copying file in DOS command

copy<space>source_file_name<space>destination_folder_with_location. 

This step-by-step article describes how to copy a file or folder to another folder.

Just begin first with open up command prompt. Also, have to locate ourselves the directory to where the file is at (Can change the directory by using the command ‘cd’ with the desired location or the source file location ).Then type

copy<space>source_file_name<space>destination_folder_with_location. 

This is the basic DOS command to move a file from a location to the another location.

Let us go through an example, consider that there is a folder named as Example which is located on the desktop in the C: drive and have to copy the folder to the D drive. To copy the Example folder from the C drive to the D drive, have to execute the following command in the command prompt.

Example of copying file in DOS

C:\Users\Admin\Desktop>copy Example D: 

Where 'Example' is folder
 

After executing the above command will get a successful message and successfully finished the operation.



Leave a Comment:


Advertisement