.SyncInclude functionality? (Syncing subsets of files within a directory)


krhjedi

Recommended Posts

Currently I have one large music directory, but I only want to sync certain artists to my other computer. The way I achieve this is by setting up a sync folder pair for each artist subdirectory.

I think it would be a great idea if a user could specify which files to only sync from a directory (opposite functionality of the .SyncIgnore). This would allow someone to sync specific artists (provided its organized as /root/artist from their root music folder, certain years from their root photo directory (provided its organized as /root/year), etc without having to create multiple folder pairs for each subset of files.

It could be implemented exactly like .SyncIgnore, just have BTSync source it's filters from a hidden file called .SyncInclude.

Link to comment
Share on other sites

I was just thinking the same thing. It seems like a natural addition.

.SyncInclude is checked for first. If it exists, only files that fit are synced.

If .SyncInclude doesn't exist, .SyncIgnore is checked for, and all files are synced except for those that fit.

Adding a blank .SyncInclude would essentially not sync any files.

Sounds very practical. I've just added one in case it gets implemented. :)

Link to comment
Share on other sites

I would go with the more flexible aproach of rsync (man 1 rsync).

In short they allow lines in the exclude file to start with "+ " or "- " (note the space behind).

Lines with a plus are include rules and lines with a minus are exclude rules (as well as lines with neither plus or minus).

The first rule that machtes counts, if none matches, there is an implicit "+ *" at the end.

Link to comment
Share on other sites

Yep, I agree - in fact I've suggested ".SyncInclude" functionality a number of times previously (just search the forum for "syncinclude").... hopefully it'll be implemented in some way shape or form in the not too distant future!

Excellent, hopefully the will implement soon! This would really make Sync alot more powerful.

I would go with the more flexible aproach of rsync (man 1 rsync).

In short they allow lines in the exclude file to start with "+ " or "- " (note the space behind).

Lines with a plus are include rules and lines with a minus are exclude rules (as well as lines with neither plus or minus).

The first rule that machtes counts, if none matches, there is an implicit "+ *" at the end.

Yes, that's a great idea. Maybe change the name of the file to .SyncFilter then.

With this functionality, it opens up a whole new area of possibilities

  • parsing music playlists and syncing only those songs
  • Team-based root level folder sharing with selection of specific directories
  • Syncing subsets of picture albums

Further functionality would be having ui for the filter modification, showing you an active filtered list of a remote directory as you modify the filter so you can see exactly what you will be receiving (or not).

Link to comment
Share on other sites

I would go with the more flexible aproach of rsync (man 1 rsync).

In short they allow lines in the exclude file to start with "+ " or "- " (note the space behind).

Lines with a plus are include rules and lines with a minus are exclude rules (as well as lines with neither plus or minus).

The first rule that machtes counts, if none matches, there is an implicit "+ *" at the end.

True. This would be a bit more complex (order is extremely important), but presumably it's for advanced users.

Link to comment
Share on other sites

Interesting, so technically you could still 'subscribe' to a folder, but pause syncing by changing removing the "+ *", or would that remove all the files in directory?

Order does sound important in this case, but having a ui in the app with a live updating view of the result set of the filter might make things less complicated.

Link to comment
Share on other sites

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.