Windows Command Line Tutorial Copying Files
--Steps To Copy Files:
1)Know Which Command To Use :There are many ways to copy files.All the commands can copy files from one location other but there are several cases to use the command over the other.
2)The Commands Are:
- COPY:This the simple and easy copy function that let you copy files form one location to other.
- XCOPY : This command allows you to copy files and and directory trees.This makes to easy to copy folders.
- ROBOCOPY; This command is designed to mirror files and directories while maintaining permissions and attributes.This is the newest copy command so it requires windows vista or later.
3)Copy A File: To copy file use COPY command.In the figure demo.txt file is copied from c:\user to c:\windows.
4)Copy All The Files In A Folder:Use *.* wildcard to copy all files from folder .In the given figure all the files are copied from c:\user to c:\windows.
5)XCOPY To copy a folder to another location:To copy files from location to another type XCOPY command.In the following figure all the contents of c:\users is copied to new folder of d:\backup.
In above figure :
- /e tells xcopy copy all subdirectories in source location
- /i tells xcopy to assume that destination is folder.This will force it to create new folder.
6)XCOPY to copy hidden files:To copy hidden files use /h modifier as well as shown below.
7)ROBOCOPY to copy all folders:In order to copy all the entire folders use ROBOCOPY command .In the given figure all the folders of c:\users are copied to d:\backup.
No comments:
Post a Comment