Delayed Delete Functionality

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CompareQ
    New User
    • Feb 2014
    • 1

    Delayed Delete Functionality

    How to achieve the following using Beyond Compare?

    • I have my data on Drive A
    • The software needs to copy (sync) all the files in Drive A to Drive B with the following requirements:
    1. If a file is deleted on Drive A, do not delete it from Drive B for 2 weeks (This helps recovering files deleted accidentally)
    2. If a file changes on Drive A, the older version on Drive B should be updated after 4 hours. (this gives an “Undo” capability on all files)

    How can Beyond Compare Pro do this? Thanks.
  • Aaron
    Team Scooter
    • Oct 2007
    • 15997

    #2
    Hello,

    BC3 does not have any timers built in to any sync methods. Instead, you would need to setup specific copy/sync sessions with File Filters. Filters can be name based, or timestamp based.

    As an example, you could have a saved Session called "Delete older than 2 weeks", set a file name filter to only show files that are older than 2 weeks, and a Display Filter to show files that are Orphans on Drive B. This leaves you with a display of files that only exist on Drive B and are older than two weeks. You could then delete them. A similar setup could be scripted to run as a Windows Automated task, but I would strongly recommend the graphical interface first. Commands in BC3 are not Undo-able, and a script would not preview any information to the user before running as an automated task.

    Updated after 4 hours would work similarly, but with a couple of hiccups. The File Filter in the Session Settings, Other Filters tab supports two modes:
    - Days ago (does not support hours)
    - A specific timestamp (requires manually calculating "4 hours ago from now" each time in the graphical interface).

    You can preview if your filter is working correctly with the View menu -> Suppress Filters (toggle), which shows/hides filtered items in a teal color. This way, you can verify that the hidden/filtered items are the ones you expect to exclude.
    Aaron P Scooter Software

    Comment

    • RodolfoGiovanninetti
      Veteran
      • Oct 2007
      • 336

      #3
      In my opinion there is not an easy and full solution for the file deletion issue.
      For example, imagine that on drive A there is a file that is one year old.
      You delete it.
      Now, with this filter the file gets deleted also on drive B.
      But, the question is to remove from B orphan files that have been deleted from A at least two weeks ago, so the time-stamp is that of the delete operation, not of the file.
      I have another idea.
      You choose orphan files that are on drive B.
      Then You move them to a different folder, named with the current date.
      If You need them, You can recover from that backup folder.
      Otherwise, after two weeks You can remove the backup folder.
      As Aaron said, it is better to test any solution in a very careful way.

      Regards

      Rodolfo Giovanninetti

      Comment

      Working...