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. C#
  4. Problem with previleges with fileInfo/directoryInfo objects for moving a file

Problem with previleges with fileInfo/directoryInfo objects for moving a file

Scheduled Pinned Locked Moved C#
helpcsharpquestion
2 Posts 2 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.
  • R Offline
    R Offline
    rajesh4u
    wrote on last edited by
    #1

    Hi, We have a situation where we need to 'move' a file from one location to another. We are using the moveTo method of fileInfo class for this. But the issue with this is that when we execute it, the file, after it has been moved to the destination folder retains the previleges of the source folder whereas it should have gotten the previleges of the destination folder. copyTo method of the same object does not have this problem. One alternative is to use the copyTo method and then delete method but that becomes a little risky and we do not want to go that route. Any ideas how we could acheve 'moving' a file in VB.NET without using the fileInfo.moveTo()? we are using .Net 1.0 Responses will be greatly appreciated. Thanks in advance

    R 1 Reply Last reply
    0
    • R rajesh4u

      Hi, We have a situation where we need to 'move' a file from one location to another. We are using the moveTo method of fileInfo class for this. But the issue with this is that when we execute it, the file, after it has been moved to the destination folder retains the previleges of the source folder whereas it should have gotten the previleges of the destination folder. copyTo method of the same object does not have this problem. One alternative is to use the copyTo method and then delete method but that becomes a little risky and we do not want to go that route. Any ideas how we could acheve 'moving' a file in VB.NET without using the fileInfo.moveTo()? we are using .Net 1.0 Responses will be greatly appreciated. Thanks in advance

      R Offline
      R Offline
      Raheem MA
      wrote on last edited by
      #2

      Hi Rajesh, I'm looking for the same , please let me know if you find any solution. Thanks in Advance, SMARTech :)

      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