Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



X- Copy directory wildcard use

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 27-03-2010
Member
 
Join Date: Mar 2010
Posts: 54
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?

Reply With Quote
  #2  
Old 27-03-2010
Member
 
Join Date: Jan 2008
Posts: 3,384
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.
Reply With Quote
  #3  
Old 27-03-2010
Member
 
Join Date: May 2008
Posts: 4,080
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.
Reply With Quote
  #4  
Old 27-03-2010
Member
 
Join Date: Mar 2010
Posts: 54
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 ???
Reply With Quote
  #5  
Old 27-03-2010
Member
 
Join Date: Apr 2008
Posts: 3,518
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.
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "X- Copy directory wildcard use"
Thread Thread Starter Forum Replies Last Post
how to disable copy cut paste with active directory? Sasanka Fernando Windows Security 1 04-03-2011 11:52 AM
SanDisk Copy Error -The directory or file cannot be created. Helen#word Operating Systems 5 01-10-2010 04:08 AM
How to copy a directory or folder Francesca Tips & Tweaks 4 27-03-2010 07:36 PM
Need to copy all content of a directory. sportsfan81 Software Development 3 29-05-2009 07:47 PM


All times are GMT +5.5. The time now is 08:38 PM.