Dantounet

Single Global .sync\ignorelist File

Recommended Posts

For a local solution to this I wrote an AutoIt3 script. The only issue it addresses is ensuring that my "authoritative" IgnoreList is duplicated to all my local Sync folders. Gives me a splash text telling me what share is missing, and waits till I have resolved that before launching Sync. I thought maybe someone else might be able to use it till there's a native Sync solution, so here it is.

#include <Array.au3>;    The 0-index element of the array contains the path to BTSync.exeLocal $paths[] = [@AppDataDir&"\BitTorrent Sync\BTSync.exe"];    The 1-index element of the array contains the path to the share containing the authoritative ignore list_ArrayAdd($paths, @UserProfileDir&"\BTSync")_ArrayAdd($paths, @UserProfileDir&"\KeePass")_ArrayAdd($paths, "O:\O_BTSync")_ArrayAdd($paths, "P:\P_BTSync");    The subdirectory of the ignore list$ignore = "\.sync\IgnoreList"$dynWidth = Round(@DesktopWidth / 16, 0)$dynHeight = Round(@DesktopHeight / 16, 0)SplashTextOn(@ScriptName, "", $dynWidth * 4, $dynHeight * 2, @DesktopWidth - ($dynWidth * 5), @DesktopHeight - ($dynHeight * 3), 5, "", 8)$splashId = "Static1"While 1    $ready = True    $splashFill = ""    For $i = 0 To UBound($paths) - 1 Step + 1        If FileExists($paths[$i]) = 1 Then            $splashFill &= "Verified: "&$paths[$i]&@CRLF            If $i = 1 Then                If FileExists($paths[$i]&$ignore) = 1 Then                    $splashFill &= "Verified: "&$paths[$i]&$ignore&@CRLF                Else                    $ready = False                    $splashFill &= "MISSING: "&$paths[$i]&$ignore&@CRLF                EndIf            EndIf        Else            $ready = False            $splashFill &= "MISSING: "&$paths[$i]&@CRLF        EndIf        Sleep(125)    Next    ControlSetText(@ScriptName, "" ,$splashId, $splashFill)    If $ready = True Then        For $i = 0 To UBound($paths) - 1 Step + 1            If $i > 0 Then                FileCopy($paths[1]&$ignore, $paths[$i]&$ignore, 9)            EndIf            Sleep(125)        Next        ExitLoop    EndIfWEndRun($paths[0])Exit

Share this post


Link to post
Share on other sites

+1

 

Can we please have a Synced Ignore file, similar to the old .SyncIgnore or git's .gitignore. Its is a huge pain to have to copy paste .sync/IgnoreList across every shared folder on every device (this is asking for trouble/accidents). Imagine if you use git for a project, and the .gitignore file is not automatically synced.

 

I understand the .sync/IgnoreList solved a problem of having client specific ignore files, which is great. But i completely disagree with removing the project (im going to call a shared folder a project) specific ignore file (like the .SyncIgnore).

 

Can we please have such feature again? heck, you can add a .sync/SyncIgnoreList (or /.SyncIgnoreList), a file that syncs across all shared devices and combines with the client specific .sync/IgnoreList when looking for files to ignore. Heck, if anyone has a problem with a Synced Ignore file, you can build a feature so that users can add .SyncIgnoreList to the client specific .sync/IgnoreList file to ignore the rules of the Synced .SyncIgnoreList file.

Share this post


Link to post
Share on other sites

+1

I think having .sync/IgnoreList as a machine specific and .syncignore as global setting (can be put into any folder). 

This will be same as Git and I believe it is the most logical and powerful solution.

Edited by houman1209
typo

Share this post


Link to post
Share on other sites
On 2/5/2016 at 2:36 PM, houman1209 said:

+1

I think having .sync/IgnoreList as a machine specific and .syncignore as global setting (can be put into any folder). 

This will be same as Git and I believe it is the most logical and powerful solution.

This, Git already has everything figured out

Share this post


Link to post
Share on other sites

+1 ... Keep the existing local .sync/ignoreList and allow for an overridable one that itself is synced to all devices.

This would be very handy when adding new devices, and with all the random disconnection problems we've been seeing, it would make reconnecting a folder slightly less painful.

Share this post


Link to post
Share on other sites

+1

It's a very important feature because currently the default ignorelist includes "*~", which is actually lots of legitimate files' name pattern. That means by default I will have lots of valuable files not in sync.

Share this post


Link to post
Share on other sites

Just registered to +1 this.

This is essential, as copying the IgnoreList manually over a bunch of folders is very cumbersome.

As mentioned before, Git has figured this out. Please consider copying it :)

Share this post


Link to post
Share on other sites

I'd also love this as I specifically bought BTSync/Resilio because of it's git like ignore syntax that allowed me to sync my development folder without the million node_modules and build artifacts. 
I just set up a new machine today and noticed it syncing loads of crud before I caught it and updated the .sync/IgnoreList file. Considering git brings it's ignore with it, I also expect some method for git-like ignore lists to be synced as well.

Just give us an option, or another file like .sync/SyncedIgnoreList

Share this post


Link to post
Share on other sites

+ 1
Yep I like a global ignore file next to the local ignore file too. In case the local and global collide the local entry should be used.

At the moment I am fixing this by copying the ignore file to the root of the sync folder so I can distribute it quickly over multiple machines. This speeds things up but I still have to start up en login on every machine.

Share this post


Link to post
Share on other sites

+1 for this feature.

To summarize what I've read:

  1. Machine-level IgnoreList (not-synced)
  2. Per-Folder IgnoreList (synced)

I'd also suggest a Per-Folder IgnoreList.Local (not-synced)

 

 

Share this post


Link to post
Share on other sites

I have a solution to this problem (part of it).

You can move that file out of .sync and create a symbolic link to it.

For Windows, assuming your folder is c:\foo:

1. Stop Resilio Sync
2. Open up cmd.exe as administrator 
3. Type these commands:

cd /D c:\foo\.sync
move IgnoreList ..
mklink IgnoreList ..\IgnoreList

4. Start Resilio Sync

This will cause Resilio Sync to sync the Ignore List when changes happen to it, but it will be viewing a Symbolic Link to the IgnoreList when reading what to ignore.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now