Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Invalid paramater - /e

    I have a batch backup file that I'm setting up and am getting an error message. I am wanting to exclude some files.

    This is the line I'm having trouble with. xcopy "Cocuments and Settings.........My DocumentsInfo Select" "S:....Info Select" /s /i /y /exclude ".bak"
    I am getting the message Invalid paramater - /e. I don't even have an /e switch in there. Does Windows XP not support /exclude?

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Invalid paramater - /e

    It's not Windows XP which is objecting! It is the Command Processor which is being passed information from XCOPY that it doesn't like your /exclude parameter.

    XCOPY /? indicates that the form is
    /EXCLUDE:file1[+file2][+file3]...
    Specifies a list of files containing strings. Each string should be in a separate line in the files. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like obj or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.

    So it seems that your parameter should have read - /exclude</big>:</big>".bak" , possibly without the double quotes.
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  3. #3
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Invalid paramater - /e

    OK, I tried it several ways.
    xcopy "Cocuments and Settings....My DocumentsInfo Select" "S:BCKWSInfo Select" /s /i /y /exclude:.bak
    xcopy "Cocuments and Settings....My DocumentsInfo Select" "S:BCKWSInfo Select" /s /i /y /exclude:".bak"
    xcopy "Cocuments and Settings....My DocumentsInfo Select" "S:BCKWSInfo Select" /s /i /y /exclude:"*.bak"
    xcopy "Cocuments and Settings....My DocumentsInfo Select" "S:BCKWSInfo Select" /s /i /y /exclude:*.bak
    xcopy "Cocuments and Settings....My DocumentsInfo Select" "S:BCKWSInfo Select" /s /i /y /exclude:.bak
    xcopy "Cocuments and Settings....My DocumentsInfo Select" "S:BCKWSInfo Select" /s /i /y /exclude:".bak"

    None of them work.

  4. #4
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Invalid paramater - /e

    OK, I figured it out. I don't know why it doesn't work like you said AND like Microsoft's site http://www.microsoft.com/resources/documen...y.mspx?mfr=true says to do it, but it does work this way.
    xcopy "Cocuments and Settings....My DocumentsInfo Select" "S:BCKWSInfo Select" /s /i /y /exclude:c:batchexclude.txt.

    Another question, can anyone tell me how to make a log of the backup once it is done?

  5. #5
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Invalid paramater - /e

    To create a log, try adding
    <code>>>c:log.txt</code>
    to the end of each line.

    <code>>c:log.txt</code> diverts what would be the screen output (list of files being copied) to the file c:log.txt, the double >> makes it append each output to the file (so the first one you might want as a single > to force a fresh txt file to be created).

  6. #6
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Invalid paramater - /e

    Another way to make a log is to pipe all the output from the BATch file to a log file - but then you will see nothing on the screen, and you wouldn't know to make any replies to prompts that you might get!

    MyBatch.bat > C:somepathMyBatch.txt
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

Posting Permissions

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