Select files to sync


A friend asks if there is/wiil be a way for ST to select files inside a share instead of synching the whole. I know there are ignore pattern possibility, but there is no way to learn the remote folder content. I read this post, but I felt it drifted from the initial question to something more technical. Maybe I didn’t understand the question.


You can generate a directory index yourself and then use .stignore to selectively sync.

For example if you wanted to do this for Music in your home directory, on a Unix-like system (sorry, I know nothing about Windows though there is surely a simple solution there) just set up a periodic cron job to do:

ls -Ra /home/cosas/Music > /home/cosas/Music/_file_index

Now in the .stignore file in your Music directory, use something like:

// don't ignore files matching these patternes

// ignore all other files in this directory

Now your periodically generated file index will sync and you will always have a list of the files available. If you decide you want to sync item(s) just use the ignore rules to add the relevant pattern(s) to the top section of the .stignore file (preceded by the ‘!’ to signify don’t ignore).


Thank you man, I’ll set a share over your cleverness with

// ignore all other

Yesterday I did small ST startup party with a friend on his two machines, and at the time of first “Add new machine” when he was next to spell the ID1 or get a USB stick, I said hey stop that, look what sync is : I pasted the ID in the ST GUI FF bookmark properties description field, which he near immadiately got on the other machine, regards to FF-Sync… he felt as :-==⊃ as I did with your answer… then cut/paste the ID1 to ST2 :blush:

Hi all

After some tests it seems I didn’t give this thread the best title according to what I had in mind.

What I’d like to have the possibility is, from the point of view of the newcomer device to a pre-existent folder share, to get a list of files in the share and only get synched with the ones the user at keyboard on this newcomer device wants. To be more precise, Alice is the original files owner, Bob would get some of the files Alice offers… and last but not least, Alice is not Bob :smile:

As long as both devices know there exist differences from the other about this folder share, maybe the remote one would be able to show this list in it’s own GUI or some unsynched file like .stignore is. When enabling a prexisting share on a device, we would be prompted to sync all/none/select/postpone. This seems to add a huge complexity to ST, but at the moment, the only way I found to do this is to call the newcomer with phone or mail, tell him I’ll propose (s)he to the share, tell she/him the name of an index file (eg _index_DevID) I already put in the folder (based on external operation, manual or cron or .job for updates), instruct him/she to create the target in her/his tree, and tell to create the .stignore as


If I don’t do this, the sync starts for * as soon as the newcomer ends its new repository config.

I tried here to bring an answer to Nutomic’s suggestion in a share with people thread and on demand link there in:

This post is not android specific. One thing I love in ST is it is multiplatform. As may has yet said, you already did a very great work.

There is work being done on a selective sync/ignore system but as you can appreciate it is a big undertaking.

In the interim, if the Alice was to set an ignore file that just contains an * entry when accepting the share she can then see the files available in the out of sync items link.

This doesn’t show the structure or distinguish folders but could be a useful starting point in your situation.

It won’t be able to see that in the next version.

[quote=“kluppy, post:5, topic:7176”] if the Alice was to set an ignore file that just contains an * entry when accepting the share[/quote]You mean Bob? Alice is the initial supplier. If she .stignore *, Bob won’t get anything, even with a !* on his side isn’t it?

More, when Bob is to accept the share, he has no way to access the stignore settings (no “Ignore patterns” button in that dialog). At the time of writing I tested a workaround for this: set my FS target for the incoming share invitation as usual, but uncheck Alice (remembering she was the initiator), save, go edit folder to get the “Edit patterns” button, set the ignore *, Save, re-enable the initiator, Save, Done.

[quote] she can then see the files available in the out of sync items link. [/quote] Nice! I just didn’t had the idea it was a link. I hope Bob has it’s own.

I guess this is not a new feature Audrius :wink: . So the current best way to do is as per 0r0 & kluppy advises? I’m trying to perform tests but, trying to think on turn as if I were Bob and Alice I muddle up myself :slight_smile: . To make things clear, does .stignore (non negated patterns) on one side makes ST on this side to ignore both matchings, ie both to reject sending (push or release) the files on its own side to the other side and to prevent files on the other side to be grabbed?

Thank you

Your last paragraph is a little confusing…

If you ignore a file on a device it ignores the files existence locally (doesn’t share it’s existence with the peers) and it’s existence globally (doesn’t retrieve the file from the other peers).

Does that answer your question?

The list of out of sync files?

The list is being removed or ignored files will no longer be in it?

Fully. Your wording is far better than mine.

Thanks kluppy

Ignore patterns on one side have no affect on the other side. All effects are local only.

In the current version, we accept information about existance of files from others even if they are ignored locally, which as a result we look out of sync to ourselves (which is true in a way)

In the next version, we drop all received updates to ignored files. We never send updates about ignored files.