Announcement

Collapse
No announcement yet.

Select and so delete empty folders

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

  • Select and so delete empty folders

    Is there some way to select just empty folders ?

    I've synchronised a directory tree and there are a lot of empty folders

    Checked on the various "select" options on the menu, but I can't see anything relating to folders ?

  • #2
    No, it is not possible to select just empty folders. Beyond Compare is a file-based utility. It is really designed to select files, not folders.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    Comment


    • #3
      I'm don't really agree, BC will quite happily create new folders, even if empty

      Also, I saw a posting about a script which used the command ...
      select empty.folders
      so it looks to be possible "under the hood"

      Comment


      • #4
        There isn't a "select" type command, but you can do it by combining snapshots with the sync command.

        1) Save a snapshot of the folder you want to clean up (Tools->Save Snapshot). Uncheck all of the checkboxes. The snapshot should be saved with everything except the empty folders.
        2) Load the snapshot across from the folder.
        3) Use the Actions->Synchronize->Mirror * commands to mirror from the snapshot to the live folder. As long as nothing else has changed, the only thing the sync will do is delete the empty folders.
        Zoë P Scooter Software

        Comment


        • #5
          Thanks Craig

          I sorted using the script I mentioned in previous reply

          Comment


          • #6
            Hello Steve,

            So everything is working well for you now? Or did you need any help setting this up as a script? We do have a snapshot command in our Scripting Reference section of the help file. I would strongly suggest testing script, especially script with a mirror command, with test files or already backed up files. A mirror command can delete files/folders it finds, and since script is automated there is no preview before it takes this action. Deletes, Moves, copies are often not undo-able.
            Aaron P Scooter Software

            Comment


            • #7
              Aaron,

              thanks for the follow-up response

              I've chicken'ed out of trying the mirror approach

              Went with the script using select empty.folders as that did the trick

              Comment

              Working...
              X