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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Program Files Nightmare

Program Files Nightmare

Scheduled Pinned Locked Moved Visual Basic
linux
5 Posts 3 Posters 1 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.
  • D Offline
    D Offline
    Dreamer2007
    wrote on last edited by
    #1

    Kindly assist me rectify VB 6.0 code below: Shell("xcopy c:\Software\Zimbabwe c:\Program Files\Zimbabwe.* /-Y") I want to copy the folder called Zimbabwe to Program Files but nothing seems to be happening.

    N D 2 Replies Last reply
    0
    • D Dreamer2007

      Kindly assist me rectify VB 6.0 code below: Shell("xcopy c:\Software\Zimbabwe c:\Program Files\Zimbabwe.* /-Y") I want to copy the folder called Zimbabwe to Program Files but nothing seems to be happening.

      N Offline
      N Offline
      nlarson11
      wrote on last edited by
      #2

      i believe the problem is that shell assumes you know the location of xcopy. so by not specifying a path for xcopy it's looking at the local directory instead of c:\windows\system32, so put the path in for xcopy

      'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous

      1 Reply Last reply
      0
      • D Dreamer2007

        Kindly assist me rectify VB 6.0 code below: Shell("xcopy c:\Software\Zimbabwe c:\Program Files\Zimbabwe.* /-Y") I want to copy the folder called Zimbabwe to Program Files but nothing seems to be happening.

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

        The XCOPY command should be:

        XCOPY C:\\Software\\Zimbabwe\\\*.\* C:\\Program Files\\Zimbabwe\\\*.\* /Y
        

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        D 1 Reply Last reply
        0
        • D Dave Kreskowiak

          The XCOPY command should be:

          XCOPY C:\\Software\\Zimbabwe\\\*.\* C:\\Program Files\\Zimbabwe\\\*.\* /Y
          

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          D Offline
          D Offline
          Dreamer2007
          wrote on last edited by
          #4

          Dave Kreskowiak wrote:

          XCOPY C:\Software\Zimbabwe\*.* C:\Program Files\Zimbabwe\*.* /Y

          I tried this but still the results are negative. When I try this same command from the DOS prompt I get an error message that says: Invalid number of parameters. I think the problem could be on the spacing of the folder name Program Files but then how can this be rectified? Pease assist.

          D 1 Reply Last reply
          0
          • D Dreamer2007

            Dave Kreskowiak wrote:

            XCOPY C:\Software\Zimbabwe\*.* C:\Program Files\Zimbabwe\*.* /Y

            I tried this but still the results are negative. When I try this same command from the DOS prompt I get an error message that says: Invalid number of parameters. I think the problem could be on the spacing of the folder name Program Files but then how can this be rectified? Pease assist.

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

            Whoops. Any path names with spaces in them should have quote marks around them.

            XCOPY C:\Software\Zimbabwe\*.* "C:\Program Files\Zimbabwe\*.*" /Y

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            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