Loading ...
Sorry, an error occurred while loading the content.

Re: [NTO] Xcopy switches for file exclusion

Expand Messages
  • Alex Plantema
    ... That s not what I meant. a non-ambiguous filename is expected after /exclude: This file should be present and contain (parts of) file names to be excluded
    Message 1 of 24 , Jul 11, 2010
    View Source
    • 0 Attachment
      Op zondag 11 juli 2010 15:27 schreef Mike Breiding - Morgantown WV:

      > Alex Plantema wrote:
      >> Op zaterdag 10 juli 2010 18:54 schreef Mike Breiding - Morgantown WV:
      >>> OK. Here are 3 more attempts:
      >>>
      >>> Added space to switches and forward slash to EXCLUDE
      >>> --------
      >>> C:\wamp\www\current\mich-ont>xcopy c:\wamp\www\current\mich-ont\*.*
      >>> c:\mich /Q /Y /D /S /E /T /EXCLUDE:.JPG
      >>> Can't read file: .JPG
      >>
      >> This is the clearest message: xcopy searched for a file named .jpg.
      >> /exclude: should be followed by a file name, without a space after
      >> the colon. The file should contain (parts of) names of files to be
      >> excluded from copying.
      >>
      >> Alex.
      >
      > Hi Alex,
      > The files *are* there. 100s of *.jpg in many subdirs.
      > I don't know why the error is generating.

      That's not what I meant.
      a non-ambiguous filename is expected after /exclude:
      This file should be present and contain (parts of) file names to be excluded from copying.
      If you use /exclude:.jpg xcopy assumes that this file is called .jpg.

      And each file with .jpg in the name is skipped, whether it's at the end of the name or not.

      What you need to do is create a file called e.g. exclusions.txt with one line containing:

      .jpg

      Then the command should contain /exclude:exclusions.txt as a parameter.

      Alex.
    • Mike Breiding - Morgantown WV
      ... We are getting close! I followed your instruction and it worked - sort of. I used: C: wamp www current mich-ont xcopy c: wamp www current mich-ont *.*
      Message 2 of 24 , Jul 11, 2010
      View Source
      • 0 Attachment
        Alex Plantema wrote:
        > That's not what I meant.
        > a non-ambiguous filename is expected after /exclude:
        > This file should be present and contain (parts of) file names to be excluded from copying.
        > If you use /exclude:.jpg xcopy assumes that this file is called .jpg.
        >
        > And each file with .jpg in the name is skipped, whether it's at the end of the name or not.
        >
        > What you need to do is create a file called e.g. exclusions.txt with one line containing:
        >
        > .jpg
        >
        > Then the command should contain /exclude:exclusions.txt as a parameter.
        >
        > Alex.

        We are getting close!
        I followed your instruction and it worked - sort of.
        I used:
        C:\wamp\www\current\mich-ont>xcopy c:\wamp\www\current\mich-ont\*.*
        C:\mich\ /Q /Y /D /S /T /exclude:exclusions.txt

        This copied all the folders, but *none* of the files.

        Thanks for your help.
        -Mike
      • Alex Plantema
        ... You should omit /T Alex.
        Message 3 of 24 , Jul 11, 2010
        View Source
        • 0 Attachment
          Op zondag 11 juli 2010 19:43 schreef Mike Breiding - Morgantown WV:

          > We are getting close!
          > I followed your instruction and it worked - sort of.
          > I used:
          > C:\wamp\www\current\mich-ont>xcopy c:\wamp\www\current\mich-ont\*.*
          > C:\mich\ /Q /Y /D /S /T /exclude:exclusions.txt
          >
          > This copied all the folders, but *none* of the files.

          You should omit /T

          Alex.
        • Mike Breiding - Morgantown WV
          ... That did it! I missed this: /T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. Thanks to all.
          Message 4 of 24 , Jul 11, 2010
          View Source
          • 0 Attachment
            Alex Plantema wrote:
            > Op zondag 11 juli 2010 19:43 schreef Mike Breiding - Morgantown WV:
            >
            >> We are getting close!
            >> I followed your instruction and it worked - sort of.
            >> I used:
            >> C:\wamp\www\current\mich-ont>xcopy c:\wamp\www\current\mich-ont\*.*
            >> C:\mich\ /Q /Y /D /S /T /exclude:exclusions.txt
            >>
            >> This copied all the folders, but *none* of the files.
            >
            > You should omit /T


            That did it!

            I missed this:
            /T Creates directory structure, but does not copy files.
            Does not include empty directories or subdirectories.


            Thanks to all.
            -Mike
          • Ray Shapp
            Hi Mike, I would use the free Everything utility from http://www.voidtools.com/ Use the main window to select your source folder(s) and the Tools Options
            Message 5 of 24 , Jul 12, 2010
            View Source
            • 0 Attachment
              Hi Mike,

              I would use the free "Everything" utility from http://www.voidtools.com/

              Use the main window to select your source folder(s) and the Tools > Options
              > Exclude tab to exclude ".JPG".

              BTW, once you install this utility, you will be using it for lots of chores.


              HTH

              Ray Shapp

              On Sat, Jul 10, 2010 at 9:56 AM, Mike Breiding - Morgantown WV <
              mike@...> wrote:

              >
              >
              > Anyone know of a way to use Xcopy or any other way which will exclude
              > files with a specified extension from being copied?
              >
              > I want to copy web files and all subdirs but exclude .jpg files
              > Thanks,
              > -Mike
              >
              > http://support.microsoft.com/kb/289483
              > --
              >
              > Morgantown WV
              >
              >
              >


              [Non-text portions of this message have been removed]
            • Mike Breiding - Morgantown WV
              ... Thanks, Ray. I will check it out. -Mike
              Message 6 of 24 , Jul 12, 2010
              View Source
              • 0 Attachment
                Ray Shapp wrote:
                > Hi Mike,
                > I would use the free "Everything" utility from http://www.voidtools.com/
                >
                > Use the main window to select your source folder(s) and the Tools > Options
                > > Exclude tab to exclude ".JPG".
                >
                > BTW, once you install this utility, you will be using it for lots of chores.
                > HTH Ray Shapp

                Thanks, Ray.
                I will check it out.
                -Mike
              Your message has been successfully submitted and would be delivered to recipients shortly.