AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() ![]() We can use environment variables in the copy command to specify the path of the folders. To copy all files in current folder to another folder copy * D:\dir1\dir2 Use of environment variables However, we can use wildcards to identify a group of files and then copy all of them in a single command.įor example, to copy all excel files from current folder to another folder F:\backup copy *.xls F:\backup\ We can’t specify multiple file names in copy command. ![]() If the file name has white space within it, we can wrap up the name in double quotes.Įxample: To copy file, my resume.doc to another folder copy "my resume.doc" D:\data\ Copy multiple files To copy the file 1.doc loated at c:\data\documents to the directory c:\data\newdocs c\> copy c:\data\documents\1.doc c:\data\newdocs\ Copy files with white space in name We can assign a different name by specifying the new name in the destination path. When we specify a directory path as the destination, the files will be copied with the same name. If the destination file exists, the above command will overwrite the same without asking the user for confirmation. C\> copy /Y c:\dir1\subdir1\file1.txt c:\dir2\subdir2\file2.txt
0 Comments
Read More
Leave a Reply. |