Results 1 to 5 of 5

Thread: X- Copy directory wildcard use

  1. #1
    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?

  2. #2
    Join Date
    Jan 2008
    Posts
    3,388

    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.

  3. #3
    Join Date
    May 2008
    Posts
    4,088

    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.

  4. #4
    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 ???

  5. #5
    Join Date
    Apr 2008
    Posts
    3,526

    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.

Similar Threads

  1. how to disable copy cut paste with active directory?
    By Sasanka Fernando in forum Windows Security
    Replies: 1
    Last Post: 04-03-2011, 10:52 AM
  2. SanDisk Copy Error -The directory or file cannot be created.
    By Helen#word in forum Operating Systems
    Replies: 5
    Last Post: 01-10-2010, 03:08 AM
  3. How to copy a directory or folder
    By Francesca in forum Tips & Tweaks
    Replies: 4
    Last Post: 27-03-2010, 06:36 PM
  4. Need to copy all content of a directory.
    By sportsfan81 in forum Software Development
    Replies: 3
    Last Post: 29-05-2009, 06:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •