Folder Compare and Move files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stocks
    New User
    • Aug 2011
    • 2

    Folder Compare and Move files

    I want to compare Folder Left with Folder Right. If the files in Folder Left match the files in Folder Right, then I want to delete the files in Folder Left.
    If the files in Folder Left are orphans, then I want to move those files to Folder Right effectively deleting the files in Folder Left. If the files in Folder Left are the same filename but contents differ from Folder Right, then leave files alone.
    In all cases the folder structure in Folder Left should be intact. Can this process be automated as it easy to manually make mistakes doing this process?
  • Aaron
    Team Scooter
    • Oct 2007
    • 15998

    #2
    Hello Stocks,

    No, not entirely. A Folder Sync session can be created that does these steps automatically, but it can only Copy, not Move. It would have to run a 2nd time (the next day) to delete the Equal files. This can be configured in the Folder Sync's Session Settings dialog, in the Sync tab.
    Newer files are a match where the file has a newer timestamp, Older has older, and Different are files that have equal timestamps but differ in content/size. If size is not enough of a content scan for you, you can enable a more detailed scan such as CRC, Binary, or Rules-based. Orphan files are files that exist only on one side, and are not aligned to another file on the other side.

    The Folder Structure is important in the Folder Sync session type; if your files are in different subfolders, they will be considered orphans rather than aligned. You would need to use a Folder Compare session type to Ignore Folder Structure and align only on name, but you would need to perform the Move commands manually (using a combination of Display Filters, and the Edit menu -> Expand All, Edit menu -> Select All Files). The Folder Compare does not have the Sync tab or customized Sync options.

    I would also like to point out, if the right side is intended to be a backup, and you have deleted the files from your computer, and the backup dies, is that ok with you? I am not sure if this scenario pertains to you, but normally you'll want your data in at least 2 locations for a proper backup. Otherwise if the 'backup' fails, the files are gone.
    Aaron P Scooter Software

    Comment

    • stocks
      New User
      • Aug 2011
      • 2

      #3
      Originally posted by Aaron
      Hello Stocks,

      No, not entirely. A Folder Sync session can be created that does these steps automatically, but it can only Copy, not Move. It would have to run a 2nd time (the next day) to delete the Equal files. This can be configured in the Folder Sync's Session Settings dialog, in the Sync tab.
      Newer files are a match where the file has a newer timestamp, Older has older, and Different are files that have equal timestamps but differ in content/size. If size is not enough of a content scan for you, you can enable a more detailed scan such as CRC, Binary, or Rules-based. Orphan files are files that exist only on one side, and are not aligned to another file on the other side.

      The Folder Structure is important in the Folder Sync session type; if your files are in different subfolders, they will be considered orphans rather than aligned. You would need to use a Folder Compare session type to Ignore Folder Structure and align only on name, but you would need to perform the Move commands manually (using a combination of Display Filters, and the Edit menu -> Expand All, Edit menu -> Select All Files). The Folder Compare does not have the Sync tab or customized Sync options.

      I would also like to point out, if the right side is intended to be a backup, and you have deleted the files from your computer, and the backup dies, is that ok with you? I am not sure if this scenario pertains to you, but normally you'll want your data in at least 2 locations for a proper backup. Otherwise if the 'backup' fails, the files are gone.
      Thanks for your response. Yes, I agree with your concern about backup. I am not wanting to do backup but instead merge down files from multiple computers eliminating dupes so that I can get a smaller footprint to use a regular backup utility.

      I am not sure I really understood all of your reply but I guess that I can code two scripts; one which does the copy; and another which finds the duplicates and deletes them from the left side keeping the folder structure intact without waiting a day. I presume this can be done using a batch file and invoking BC twice.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 15998

        #4
        Hello,

        As long as the two scripts don't run at the same time, yes. You can make them sequential steps in a single .bat file so that one is called and finished and then the other runs to help avoid them conflicting.

        I would also suggest testing the steps manually in the graphical interface first. Ignore Folder Structure is not a means to find duplicates, but helps align files based on only file name and disregards the subfolders they were in. If there are multiple file names with the same name, this can cause problems for the Ignore Folder Structure option.

        For the Folder Sync device, the reason it needs to "run twice" is that there is no "Move" option in the Sync tab. You can only Copy files, which would result in them being equal. If you then run it again, you can "delete left" for all "equal files", which is like moving them, and what you wanted to do anyway if an equal pair was found.
        Aaron P Scooter Software

        Comment

        Working...