Results 1 to 6 of 6

Thread: XCOPY Exclude issue while copying file

  1. #1
    Join Date
    Jul 2009
    Posts
    1,179

    XCOPY Exclude issue while copying file

    Hello,
    In my script I have been using the forum of how it works to copy of my partition C: \ \ directory in D: \ \. This was for without copying the files that it finds. So for that my command line was XCOPY C: \ test C: \ first / t / e. Here test is the source directory and first the destination directory. This command did not copy the destination folder no right to access it so I thought to cancel copying this file is using the parameter exclude. What to do here now.

  2. #2
    Join Date
    May 2008
    Posts
    3,316

    Re: XCOPY Exclude issue while copying file

    You can try to go for this command. XCOPY C: \ test C: \ first / t / e / EXCLUDE: c: \ test \ \ cab \. Just try out once and passion this command. I think this might can work for you. Also check out the directory of which you want the backup. Just ensure the location properly and run the command.

  3. #3
    Join Date
    Apr 2008
    Posts
    4,642

    Re: XCOPY Exclude issue while copying file

    Exclude must give the name of one or more text files which are lists negative values. If the string of a line is recognized in the path of a file it is ignored. Like for example dontcopythis.txt creates a file for example, with a line that contains the path of your directory Kab (to be sure) C: \ test \ ... \ ... \ kab. This is case sensitive of course.

  4. #4
    Join Date
    May 2008
    Posts
    4,570

    Re: XCOPY Exclude issue while copying file

    Yet it's not complicated. Have you tried XCOPY. It gives you the info what I'm talking to you. EXCLUDE does not list names negatives directly. There may be many. Here you need to tell the xcopy about the files and list to be generated. That can be somewhat like this / EXCLUDE: C: \ list.txt. You will only need to get the the entire parameters for the same.

  5. #5
    Join Date
    May 2008
    Posts
    4,345

    Re: XCOPY Exclude issue while copying file

    XCOPY will exclude all files CONTAINER. Db and all files CONTAINER. Bak You correspondence command will therefore should not put something like *. db if it does not work. It is the XCOPY search string. Db or. Bak files in the copy. The sample for entire can be like xcopy F: \ S: \ Save / D / E / C / I / F / Y / EXCLUDE: list.txt. If the file list.txt is located in the directory you want to save him and that you do not want to copy then you add his name on a line in the file.

  6. #6
    Join Date
    May 2008
    Posts
    4,831

    Re: XCOPY Exclude issue while copying file

    The first command generates a .txt file in the directory name which is needed to be excluded by Xcopy. That is not happening in your case. The second echo in the command itself has the name of a files which initates XCOPY to exclude the files from the working list. Thus the exclude file gets deleted and the XCOPY command is deleted.

Similar Threads

  1. Log For xcopy batch file
    By Beverly Archer in forum Software Development
    Replies: 4
    Last Post: 31-03-2010, 01:31 PM
  2. XCOPY invalid parameter issue
    By Visala28 in forum Windows Software
    Replies: 5
    Last Post: 08-02-2010, 11:56 AM
  3. How to use XCOPY to duplicate file?
    By gazwsx in forum Operating Systems
    Replies: 3
    Last Post: 19-08-2009, 07:53 PM
  4. Batch file Xcopy without manual F
    By Stockholm in forum Operating Systems
    Replies: 1
    Last Post: 13-01-2009, 09:54 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,719,214,190.66219 seconds with 17 queries