Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: someone help me !!!!  (Read 3586 times)

0 Members and 1 Guest are viewing this topic.

alienware

    Topic Starter


    Greenhorn

    someone help me !!!!
    « on: February 26, 2010, 11:48:51 AM »
    hi...
    ....i have a problem....i edited that below..it's from computerhope.com .....i edited it to copy some files to and from my PC..and it's working...but....the problem is that it doesn't copy the file on that adress..:
    XCOPY I:\Stick\Short\*.* C:\Documents and Settings\All Users\Start Menu\Programs\Startup\ /S/Y
    and on the screan apears "Invalid number of parameters".....
    ...why is that...i dont know to much on this...please someone help me !!!!!!  :) :-\


    Code: [Select]
    ECHO OFF
    CLS
    :MENU
    ECHO.
    ECHO .............................................................
    ECHO PRESS 1 or 2 to select your task, or 3 to EXIT
    ECHO .............................................................
    ECHO.
    ECHO 1 - Import Files from PERSONAL DRIVE (H:) to COMPUTER
    ECHO 2 - Export Files from COMPUTER to PERSONAL DRIVE (H:)
    ECHO 3 - EXIT
    ECHO.
    SET /P M=Type 1, 2, or 3, then press ENTER:
    IF %M%==1 GOTO IMPORT
    IF %M%==2 GOTO EXPORT
    IF %M%==3 GOTO EOF
    :IMPORT
    XCOPY I:\Stick\Iass\*.* C:\WINDOWS\Iass\ /S/Y
    XCOPY I:\Stick\Short\*.* C:\Documents and Settings\All Users\Start Menu\Programs\Startup\ /S/Y
    GOTO MENU
    :EXPORT
    XCOPY C:\WINDOWS\Iass\notepad.txt I:\Favorites\ /S/Y
    GOTO MENU

    greg



      Intermediate

      Thanked: 7
      Re: someone help me !!!!
      « Reply #1 on: February 26, 2010, 12:10:43 PM »
      XCOPY I:\Stick\Short\*.* C:\Documents and Settings\All Users\Start Menu\Programs\Startup\ /S/Y

      When any of the folders in the original or destination path have spaces,
      we must enclose the path with quotes  "path open". 

      For example:

      "C:\Documents and Settings\All Users\Start Menu\Programs\Startup\"  /S/Y


      http://commandwindows.com/command2.htm

      ( information below from above site. )

      " if there are spaces in a name, the path and file name have to be enclosed in quotes. Adding the switch "/s" provides that subfolders and their contents will also be copied. Other switches provide for read-only and hidden files. Altogether, there are something like 27 command line options for xcopy. More information is on this page."



      p.s. Test the lines in the batch at the command level with fewer files for the test.
      « Last Edit: February 26, 2010, 12:24:04 PM by greg »
      Have a Nice Day

      alienware

        Topic Starter


        Greenhorn

        Thanks....
        « Reply #2 on: February 26, 2010, 12:38:43 PM »
        thanks for advice...i will try...thx.. :)
        if something goes wrong i will post here...thx

        alienware

          Topic Starter


          Greenhorn

          Thanks !!!!!
          « Reply #3 on: February 26, 2010, 12:52:27 PM »
          i solve it....i encloseed the path with quotes.....it works properly now...thanks again.... ;D :) ;D