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. How to copy a root directory (copy a flash drive) and paste it somewhere else?

How to copy a root directory (copy a flash drive) and paste it somewhere else?

Scheduled Pinned Locked Moved Visual Basic
helpadobetutorialquestion
2 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.
  • B Offline
    B Offline
    Brandon X12000
    wrote on last edited by
    #1

    Hello:confused:, I'm having this problem to where I cannot copy a root directory (e.g.,J:\, F:\, V:\, E:\ <--Common removable drive roots) of a flash drive onto a specific area of the main hard drive on my computer. It's basically copying the drive "J:\" to "C:\Flash Backup\Current date and time" on my computer, but I'm facing a problem, while compiling and debugging it gives me the error: Could not complete operation since directory is a root directory: 'C:\'.... is there anyway around this? I'm using the following line of code to copy it: Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(directory to copy from, where to copy, some other stuff that are boolean values) Any help would be greatly appreciated...:thumbsup: Regards, Brandon T. H. Codeproject Member

    S 1 Reply Last reply
    0
    • B Brandon X12000

      Hello:confused:, I'm having this problem to where I cannot copy a root directory (e.g.,J:\, F:\, V:\, E:\ <--Common removable drive roots) of a flash drive onto a specific area of the main hard drive on my computer. It's basically copying the drive "J:\" to "C:\Flash Backup\Current date and time" on my computer, but I'm facing a problem, while compiling and debugging it gives me the error: Could not complete operation since directory is a root directory: 'C:\'.... is there anyway around this? I'm using the following line of code to copy it: Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(directory to copy from, where to copy, some other stuff that are boolean values) Any help would be greatly appreciated...:thumbsup: Regards, Brandon T. H. Codeproject Member

      S Offline
      S Offline
      Skynet_Code
      wrote on last edited by
      #2

      Hi. I think your problem comes with WNet security implementation exploited by your Runtime (viewing code, I denote .NET but don't know what release). Perhaps making a 'net use ...' first, could solve the IOException. If not, here you can find information : http://msdn.microsoft.com/en-us/library/Aa385413[^] Hope it helps! Regards

      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