.syncignore examples


Recommended Posts

The unofficial faq has a couple examples for using the .syncingore. I was hoping someone could provide some more examples on excluding subfolders.

So I'm clear the .syncignore is a .txt file uth-8. So with notepad I would make a new file and save it in uth-8 format file as .syncignore.txt, correct?

To give an example to excluding a folder I have c:\stuff shared and I want to ignore c:\stuff\folder1 and c:\stuff\folder5. What do I add to the .syncignore.txt?

What about having an include option? include only .mp4. Similar to how robocopy can do includes and excludes.

Thanks

Link to comment
Share on other sites

So I'm clear the .syncignore is a .txt file uth-8. So with notepad I would make a new file and save it in uth-8 format file as .syncignore.txt, correct?

Correct! (although when you add a new folder to BitTorrent Sync, a .SyncIgnore file should be automatically created in the folder you've just added)

To give an example to excluding a folder I have c:\stuff shared and I want to ignore c:\stuff\folder1 and c:\stuff\folder5. What do I add to the .syncignore.txt?

Add the lines:

folder1

folder5

What about having an include option? include only .mp4. Similar to how robocopy can do includes and excludes.

This has been suggested a number of times (for instance, here) - a sort of ".SyncInclude" alternative/addition to ".SyncIgnore" to include, rather than exclude files/folders - unfortunately, at present time, such a feature isn't available, but do suggest it in the wishlist thread!

Link to comment
Share on other sites

I'm syncing data among 2 windows and one debian machines. There is folderX which I want to be exclude from syncing. What should I write in .SyncIgnore files on both windows and debian clients if the folder name may coincide with other folders? Example:

/sync-folder/

/sync-folder/folderX

/sync-folder/folder1/folderX

I want to exclude folderX only from folder1.

Link to comment
Share on other sites

This: /folder1/folderX

The leading '/' is relative to the sync root and not the system root. I like to avoid using the leading slashes though because that way you can't use the .SyncIgnore files as an ignore list with 'tar' for instance.

Thank you. Do you mean that on windows client I also should use "/" or "\" instead?
Link to comment
Share on other sites

  • 2 weeks later...

I'd try /*/ or /*/*.

The latter would leave empty directories on the other peers.

I tried various expressions before, including the ones in your suggestion.

I always end up with empty subdirectories.

But what i would like is that there is even no creation of the subdirectories.

Funny thing is, even very odd expressions like ./ or ./* caused the same effect here:

subdirectories are created but no files in it.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.