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. C / C++ / MFC
  4. How to copy a locked file... ?

How to copy a locked file... ?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestionhelp
3 Posts 3 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.
  • C Offline
    C Offline
    CoolVini
    wrote on last edited by
    #1

    I am wondering how can I copy/backup a locked file. Seems that almost all backup programs can do it so it's sound simple, but I can not find anything on this Can you help me and give me some guide lines ? what and where to search for ? Thank you in advanced :rose:. Vini

    D P 2 Replies Last reply
    0
    • C CoolVini

      I am wondering how can I copy/backup a locked file. Seems that almost all backup programs can do it so it's sound simple, but I can not find anything on this Can you help me and give me some guide lines ? what and where to search for ? Thank you in advanced :rose:. Vini

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      CoolVini wrote: Seems that almost all backup programs can do it... All the ones I've ever used will skip files open by other processes.


      "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

      1 Reply Last reply
      0
      • C CoolVini

        I am wondering how can I copy/backup a locked file. Seems that almost all backup programs can do it so it's sound simple, but I can not find anything on this Can you help me and give me some guide lines ? what and where to search for ? Thank you in advanced :rose:. Vini

        P Offline
        P Offline
        peterchen
        wrote on last edited by
        #3

        If the process opening the file did not specify any sharing options, you cannot access it. You should specify GENERIC_READ and FILE_SHARE_READ | FILE_SHARE_WRITE when openign the file.


        Flirt harder, I'm a Coder
        mlog || Agile Programming | doxygen

        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