Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Copy Fail

Copy Fail

Scheduled Pinned Locked Moved Visual Basic
toolslinuxhelptutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vijjuuu
    wrote on last edited by
    #1

    Hi All, Can any one help me in how to format the command for Run method in script ? i have tried different way in giving input for Run method but it doent work , can any one look into below code Below code is doing a XCopy for source to destination . Set oShell = CreateObject("WScript.Shell") RetVal = oShell.Run("""C:\Program Files\XYZ\ABC\XCopy.exe"" ""C:\Program Files\XYZ\ABC\staging\Advance NDC\utility\vvv.txt"" ""C:\Program Files\XYZ\ABC\utility\vvv.txt"" / s / q / y", 2, True)

    D 1 Reply Last reply
    0
    • V Vijjuuu

      Hi All, Can any one help me in how to format the command for Run method in script ? i have tried different way in giving input for Run method but it doent work , can any one look into below code Below code is doing a XCopy for source to destination . Set oShell = CreateObject("WScript.Shell") RetVal = oShell.Run("""C:\Program Files\XYZ\ABC\XCopy.exe"" ""C:\Program Files\XYZ\ABC\staging\Advance NDC\utility\vvv.txt"" ""C:\Program Files\XYZ\ABC\utility\vvv.txt"" / s / q / y", 2, True)

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      IT doesn work because you're putting spaces between the forward slashes and the commands. You've got: (BTW: I hope you have XCOPY.EXE in that folder you specified!)

      "...XCopy.exe" "C:\\..." "C:\\..." / s / q / y"
      

      When it should be:

      "...XCopy.exe" "C:\\..." "C:\\..." **/s /q /y**"
      

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008
      But no longer in 2009...

      V 1 Reply Last reply
      0
      • D Dave Kreskowiak

        IT doesn work because you're putting spaces between the forward slashes and the commands. You've got: (BTW: I hope you have XCOPY.EXE in that folder you specified!)

        "...XCopy.exe" "C:\\..." "C:\\..." / s / q / y"
        

        When it should be:

        "...XCopy.exe" "C:\\..." "C:\\..." **/s /q /y**"
        

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        V Offline
        V Offline
        Vijjuuu
        wrote on last edited by
        #3

        Thanks for pointing out .

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups