X- Copy directory wildcard use
Hello everyone ,
I am using windows XP and have some confusion.The question is that when using xcopy, how specific can you be with wildcards when trying to locate which directories to find in? If I have a directory within more subdirectories and it is named as " My_data1, My_data2, etc" and I need to find those for files to be copied, can I locate as \My_data*\ for example?
XCopy directory wildcard use
I would recommend you a test and should be happened one line at a time, until DIR can't get something. Just perform the search with the following way to make sure it is being populated by dir command.
dir "c:\documents and settings\Dir1\My_data*\*.doc"
According to me,the XCOPY should be capable to copy entire things which can be supported to show directory with DIR command. If DIR is unable to cannot see anything with "c:\documents and settings\dir1\My_data*" then I don't think that it can be possible to execute the command with wild card.
XCopy directory wildcard use
Xcopy is very useful and much complex command utility provided by DOS and the evaluation of the command looks quite unpredictable.
xcopy "c:\documents and settings\dir1\*.doc" \newFolder /S /E /L
it should hunt down entire .doc files contained within the c:\documents and settings\Dir1 directory tree and list them.
X- Copy directory wildcard use
I am getting slowly but getting confused to get the reply given by solomon.It is looking so complex for me to understand properly.
The thing are getting clear that the command supported by the dir with thr wild card would also be supported with the Xcopy command associated with wild card. But the addition option,i am not getting properly,What it means to put there ???
X- Copy directory wildcard use
Hi,
Alright, the additional options that you are looking there is only for some advance implementation of searching the desired components.
Solomon used /L switch as a whatif condition. It will provide you a chance to investigate what will actually get copied. And when you came to satisfaction with the evaluated result just remove the /L switch.
He also added the /S switch to test the subfolders and the /E switch tagged for investigation about empty folders. It is not necessary to add them. Check xcopy /? for all the gory description on the switches.