Announcement

Collapse
No announcement yet.

How to compare and auto delete task

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to compare and auto delete task

    Hi,

    For the internal project, I'm modifying the OS. I have a reference image from which the files have been removed. I need to remove the same files from my image too. How can I use Beyond compare to compare the entire directory structure with all files and folders inside them and remove the ones from the second image which are not found in the first image ?

    It would also be helpful if I can make a list of the difference organised as the folder structure or one list per folder.

    Any help will be greatly appreciated

    Thanks.

  • #2
    Hello,

    If you use BC4 Pro's Folder Merge session, it sounds like you have a common Ancestor image (Center Inputpane), a branch with specific files removes (Left or Right), and your folder without removals (Left or Right) and you can merge/output to either side or a 4th output location.
    Or can you load a two-way Folder Compare between Yours and the Modified folder to find the orphan files on Yours side, and would those need to be deleted?

    Please note that Undo is not supported in BC4, so please review any actions (copy/delete/etc) before committing. I would recommend working with test folders or not overwriting source files while learning the workflow.
    Aaron P Scooter Software

    Comment


    • #3
      Originally posted by Aaron View Post
      Hello,

      it sounds like you have a common Ancestor image (Center Inputpane)
      Hello Aaron,

      First, allow me to thank you for taking interest in my topic.

      No, first image that has to be used as a reference is from 2015. Another image is current from 2019. The files on both images are modified on different dates so they can't be interchanged or merged in any way. All I have to do is to use the image from 2015 as reference to what files and folders are NOT in there compared to image from 2019 and subsequently delete it from the 2019 image, that's all.

      How can this be done ? Can you detail simple steps for me follow, if possible ?

      Your help is highly appreciated. Thank you.

      Comment


      • #4
        Ok, so if you use the Folder Compare with two base folders: 2015Ref and 2019Ref, and use the Show Differences dropdown (or View menu ->) Show Orphans, is this the view you are looking for?

        Please note that Orphans are any files that are unaligned, which includes renames or moved files (not in the same subfolder structure). Would these count as things that need deletion without review?

        Just to re-iterate: BC4 has no Undo command, so please test with test data or already backed up data while learning how our comparison aligns and works.
        Aaron P Scooter Software

        Comment


        • #5
          Originally posted by Aaron View Post
          Ok, so if you use the Folder Compare with two base folders: 2015Ref and 2019Ref, and use the Show Differences dropdown (or View menu ->) Show Orphans, is this the view you are looking for?.
          Yes, something like that. Compare two folders and and all the folders and files inside them. Use 2015Ref as source and delete all the excess files and folders from 2019Ref while leaving 2015Ref untouched.

          Orphans won't work because deletions need to follow precise folder structure and filenames.

          One more thing if possible, create a simple text file of what was deleted for every folder for future references in case something goes wrong.

          Your point about undo has been noted. I have full backups so we don't need to worry on that account.

          Thanks for the help.

          Comment


          • #6
            ooh! Just forgot to ask one thing. How can I initiate a comparison and a delete task ?

            Comment


            • #7
              BCScripting can perform specific steps automatically, but it assumes the alignment is working as expected. What about Orphans definition not work in this scenario? Does it work if on one side or the other, selecting only those files with the Select All Files command, and Shift+Arrow keys to slide the selection only to the side to delete, and deleting them?

              Once we find a good workflow in the interface, we can then configure the script to help perform those steps automatically.
              Aaron P Scooter Software

              Comment


              • #8
                Hi Aaron,

                Thank you for staying with me.

                The plan is to delete the excess files from 2019Ref image. BC4 should automatically enlist all the excess files in the 2019Ref image, should it not ? from there we just have to execute the delete command and save the log of what was deleted.

                Sounds simple enough.

                Comment


                • #9
                  Yes, but we want to make sure file structure and comparison is displaying as you expect, so that the concept of Orphan lines up with what needs to be deleted. From your description, is sounds like Orphans in 2019Ref should be deleted. If you test these steps in the graphical interface, is this what you need to do?
                  Aaron P Scooter Software

                  Comment

                  Working...
                  X