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#
  4. help... backup directory... any idea/class?

help... backup directory... any idea/class?

Scheduled Pinned Locked Moved C#
helpquestion
6 Posts 4 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.
  • L Offline
    L Offline
    leeoze 0
    wrote on last edited by
    #1

    hi, My goal is to create backup for a directory every 5 minutes. But here is the trick, this backup needs to be done during my working with files on this directory. which means that I would probebly have a word document open while the directory is beening backup. so far every move that I've made I recived "cann't access file". Please help... tnx

    C S A 4 Replies Last reply
    0
    • L leeoze 0

      hi, My goal is to create backup for a directory every 5 minutes. But here is the trick, this backup needs to be done during my working with files on this directory. which means that I would probebly have a word document open while the directory is beening backup. so far every move that I've made I recived "cann't access file". Please help... tnx

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Correct, you can't copy a locked file. No way around it.

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      • L leeoze 0

        hi, My goal is to create backup for a directory every 5 minutes. But here is the trick, this backup needs to be done during my working with files on this directory. which means that I would probebly have a word document open while the directory is beening backup. so far every move that I've made I recived "cann't access file". Please help... tnx

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        yes, you can't access a locked file.

        Christian Graus Driven to the arms of OSX by Vista.

        1 Reply Last reply
        0
        • L leeoze 0

          hi, My goal is to create backup for a directory every 5 minutes. But here is the trick, this backup needs to be done during my working with files on this directory. which means that I would probebly have a word document open while the directory is beening backup. so far every move that I've made I recived "cann't access file". Please help... tnx

          S Offline
          S Offline
          Simon P Stevens
          wrote on last edited by
          #4

          You might want to take a look at the Volume shadow copy service (or VSS) Here's some links to get you started. Wikipedia page on VSS[^] MSDN reference[^] CP article about shadow copying in .net[^] (Disclaimer: I've never used it personally, but I think it's what you are looking for.) Good luck.

          Simon

          1 Reply Last reply
          0
          • L leeoze 0

            hi, My goal is to create backup for a directory every 5 minutes. But here is the trick, this backup needs to be done during my working with files on this directory. which means that I would probebly have a word document open while the directory is beening backup. so far every move that I've made I recived "cann't access file". Please help... tnx

            A Offline
            A Offline
            Alan Balkany
            wrote on last edited by
            #5

            Two suggestions which I haven't tried, so aren't guaranteed to work: 1. Using automation (http://www.codeproject.com/KB/COM/word_ole_bm.aspx[^]) you can launch Word to edit your file. Then in the program that launched Word, you can issue a "Save As" command (at regular intervals or on-demand) to save a backup copy of your file, without disturbing the editing session. 2. Word is capable of running macros (http://wordprocessing.about.com/od/workingwithmacro1/l/blmacrointro.htm[^]). You can have a macro to invoke "Save As" to save a backup copy, without disturbing editing.

            L 1 Reply Last reply
            0
            • A Alan Balkany

              Two suggestions which I haven't tried, so aren't guaranteed to work: 1. Using automation (http://www.codeproject.com/KB/COM/word_ole_bm.aspx[^]) you can launch Word to edit your file. Then in the program that launched Word, you can issue a "Save As" command (at regular intervals or on-demand) to save a backup copy of your file, without disturbing the editing session. 2. Word is capable of running macros (http://wordprocessing.about.com/od/workingwithmacro1/l/blmacrointro.htm[^]). You can have a macro to invoke "Save As" to save a backup copy, without disturbing editing.

              L Offline
              L Offline
              leeoze 0
              wrote on last edited by
              #6

              tnx but my problem is bigger than this. I need to buckup the whole folder including other files that might be in use (xls,spss & etc.) it's a pain. but tnx anyway

              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