Windows command line commands to copy files:
COPY :
Copy one or more files to another location .
Syntax
COPY source destination [options]
COPY source1 + source2.. destination [options]
Key
source : Pathname for the file or files to be copied.
/A : ASCII text file (default)
/B : Binary file copy - will copy extended characters.
destination : Pathname for the new file(s).
/V : Verify that the new files were written correctly.
/N : If at all possible, use only a short filename (8.3) when creating a destination file. This may be necessary when copying between disks that are formatted differently e.g NTFS and VFAT, or when archiving data to an ISO9660 CDROM.
/Z : Copy files in restartable mode. If the copy is interrupted part way through, it will restart if possible.
Examples:
To copy file from source to destination
COPY sourcefile.doc destinationfile.doc
To copy from a different folder/directory:
COPY "C:\myfolder\sourcefile.doc" "D:\Newfolder\destinationfile.doc"
To copy all the files into the current directory specify the source only, with a wildcard:
COPY "C:\myfolder\*.doc"
To copy all the files to a different directory:
COPY "C:\myfolder\*.txt" "D:\Newfolder\destfiles.txt"
To have no feedback on screen while copying , specify the following command :
COPY sourcefile.doc destinationfile.doc >nul
No comments:
Post a Comment