Announcement

Collapse
No announcement yet.

Batch script error

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Batch script error

    See anything wrong with the following script?

    @echo off
    xcopy C:\Data\DeMaSy\*.exe C:\Program Files (x86)\Silicon DNA\DeMaSy
    pause

    I get an error message reading: Invalid number of parameters.


  • #2
    Re: Batch script error

    Originally posted by jon80 View Post
    See anything wrong with the following script?
    The paths should each be wrapped beteen quote signs, because there're spaces in it. (Even if there were no spaces in the directory there could also be spaces in the name of one of the exe files).

    xcopy "C:\Data\DeMaSy\*.exe" "C:\Program Files (x86)\Silicon DNA\DeMaSy\"

    (note the last backslash added. this way the command assumes the last name is a subfolder and not the name of a file)


    /Rems

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment

    Working...
    X