Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Nov 2007
    Location
    U.S.
    Posts
    184

    Default Sync Mirror:Left->Right not deleting empty folders

    I have a script that is not deleting empty folders on the right side. My script is like this:

    load "My Session"
    sync mirror:left->right

    The left side is an FTP site and the right side is a local NTFS disk.

    When I run the session in the GUI, it deletes the empty folders on the right, but this doesn't work when I run the script.

    Perhaps I'm doing something wrong as this is my first script and I understand that the Sync script command is still in beta.

    Also, what is the difference between Sync Update and Sync Mirror?

    (build 211 on WinXP)

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    2,520

    Default Re: Sync Mirror:Left->Right not deleting empty folders

    I'll look into it on Monday; the script looks right, so it's probably a bug in how scripts handle empty folders.

    As for your other question:

    Update copies newer and orphan files from the source to the destination. It leaves files that are newer or orphans in the destination alone, so it's good for incremental backups. The bidirectional update copies newer and orphan files in both directions, so it should handle cases where you've updated files on both sides, but won't handle deletes. The update command does not overwrite files that are different but have the same timestamp on both sides.

    Mirror makes the destination directory exactly like the source one. It will copy older, newer, and orphan files from the source and delete any orphan files in the source.
    ZoŽ P Scooter Software

  3. #3
    Join Date
    Nov 2007
    Location
    U.S.
    Posts
    184

    Default Re: Sync Mirror:Left->Right not deleting empty folders

    I'm not sure if you planned to fix this in build 212, but I just downloaded and tested it and it's still not working as I would expect.

    Here's an example:

    1) Left Side: create a new file inside a new folder.

    2) Do a sync as per my script above.

    (Now, both sides contain the new file & folder.)

    3) Delete the new file and the new folder on the left side.

    4) Run the sync script again.

    Left Side: new file and new folder are gone.

    Right Side: new file is gone, but new folder still exists (incorrectly).

    Thanks.

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    2,520

    Default Re: Sync Mirror:Left->Right not deleting empty folders

    Thanks for the reminder.

    This is due to a bug in the way the "Create Empty Folders" flag is being handled. It's actually in the interactive sync too, but you probably have that option checked so you wouldn't see it there.

    This will be fixed in the next release. You can work around it in the current one by adding the create-empty flag to the sync command: sync create-empty mirror:left->right. You'll probably want that set for mirror syncs anyway.
    ZoŽ P Scooter Software

  5. #5
    Join Date
    Nov 2007
    Location
    U.S.
    Posts
    184

    Default Re: Sync Mirror:Left->Right not deleting empty folders

    The "create-empty" flag solves the problem for me. Thanks.

  6. #6
    Join Date
    Nov 2007
    Location
    U.S.
    Posts
    184

    Default Re: Sync Mirror:Left->Right not deleting empty folders

    For build 215, I read in the release notes:
    Fixed "Synchronize Folders" handling of empty folders.

    Could someone elaborate on this?

    1) I'm assuming that it won't affect my manual syncs (in options, I enable "Create Empty Folders").

    2) In my script I'm currently using "sync create-empty mirror:left->right". Does the create-empty flag have any effect in this command now? Isn't it redundant since I'm using the mirror command? Can I remove the create-empty flag?

    Thanks in advance.

  7. #7
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    2,520

    Default Re: Sync Mirror:Left->Right not deleting empty folders

    I don't have a specific reference handy right now, but I think there were two issues: It wasn't deleting empty orphaned folders in certain circumstances, and the "Only affect visible files" option was overridding the "Create empty folders" command. It was a weird combination, but we switched it to be compatible with v2.0.

    You'll still need create-empty when doing a mirror synch. I realize it would be a bit weird to not want that behavior, but again, we wanted to be compatible with the v2.0 behavior.
    ZoŽ P Scooter Software

  8. #8
    Join Date
    Mar 2018
    Posts
    1

    Default

    Quote Originally Posted by ZoŽ View Post
    I don't have a specific reference handy right now, but I think there were two issues: It wasn't deleting empty orphaned folders in certain circumstances, and the "Only affect visible files" option was overridding the "Create empty folders" command. It was a weird combination, but we switched it to be compatible with v2.0.

    You'll still need create-empty when doing a mirror synch. I realize it would be a bit weird to not want that behavior, but again, we wanted to be compatible with the v2.0 behavior.
    I realize it's an old thread but considering the issue has still not been fixed, I'll post here to see what the current status is. I just attempted my first sync job (Mirror to Right) with default settings for two drives and was surprised to find many empty folders left behind on the right side result. These are folders (and sub folders) where files used to exist, now just empty folders left. This seems like an odd default behavior, is there a setting I need to change to truly mirror the two drives?

  9. #9
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,715

    Default

    In Beyond Compare 4's Folder Sync, click the Rules toolbar button (referee icon). In the Handling tab, make sure Sync empty folders is checked.
    Chris K Scooter Software

  10. #10
    Join Date
    Feb 2013
    Posts
    7

    Default

    Quote Originally Posted by Chris View Post
    In Beyond Compare 4's Folder Sync, click the Rules toolbar button (referee icon). In the Handling tab, make sure Sync empty folders is checked.
    I'm having the same issue here. The option you refer to, Chris, is also mentioned in the Help file, but it is not present in the UI. Well, at least I can't see it. I'm running BC v4.2.6.23150 64-bit. Please can you look into this? Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •