Recommended Posts

Currently it's not possible to "sort" columns in the various tabs within the user interface - although, feel free to suggest this in the Wishlist thread. (Improvements were recently made to columns to allow you to choose which are shown/hidden, so adding the ability to "sort" their contents shouldn't be too hard!)


However, at present, folders in the "My Sync" tab are listed in the order the were added to Sync, therefore one potential "workaround" would be to note all the secrets for your existing folders, remove them from Sync and then add them back in the order you want (with their corresponding original secrets) - far from an ideal solution, but a "workaround" none the less!

Link to post
Share on other sites
  • 5 months later...

Q. Does anyone have a suggestion for Alphabetizing my List of Folders in BitTorrent Sync?

Reason: When you are syncing 15-20 folders, it is easy to skip one.

I've successfully reordered folders by editing the sync.dat file. It appears that I haven't broken BTsync yet. Nonetheless, if you follow my instructions below, proceed with caution and don't expect this to necessarily work in the future.


In examining sync.dat, (in Windows, it's at %UserProfile%\AppData\Roaming\BitTorrent Sync), you'll note that each synced folder is delimited by folder_typei0e4 and initializedi1ee. Within each entry, the path parameter is your clue to the identity of the synced folder.


Before starting, you'll want to familiarize yourself with an advanced text editor, such as Sublime Text or Notepad++ so that we can employ regex for a surgical find & replace followed by reordering.


With that in mind, here are my steps for for reordering.

  • Shut down BTsync. Be sure that you've fully shut down BTsync on not just closed the UI.
  • Find sync.dat on your device. (In Windows, it's at %UserProfile%\AppData\Roaming\BitTorrent Sync)
  • Create a backup copy of sync.dat.
  • Open sync.dat in an advanced text editor, such as Sublime Text or Notepad++.
  • Perform a search & replace (using regex option), for all instances:
    • Search for: d11:folder_typei0e4(.*?)initializedi1ee
    • Replace with: \nd11:folder_typei0e4\1initializedi1ee\n
  • Note that now each synced folder is visually separated by two hard returns.
  • Reorder the folder entries by cutting & pasting or by clicking inside an entry and using the line swap keyboard shortcut of your editor to move a line incrementally up or down the page.
  • Once everything is reordered as you'd like, remove all of the hard returns that you've created, including any after 'foldersl' and before 'e8:identityd11'.
  • Save & close sync.dat.
  • Run BTsync.
  • You will find that BTsync backs up a copy of sync.dat as sync.dat.######.bad. This always happens after editing sync.dat.
  • If BTsync can't understand your edits, it will restore from sync.dat.old. You also have your backup copy of sync.dat should things go completely awry.

I hope that this helps while we wait for the ability to reorder or sort folders in BTsync.

Link to post
Share on other sites

@Plan 55-A

Note, that sync.dat contains a bunch of non-printable characters (well, it is a binary file!) so you'd better use hex editor or text editor which does not change non-printable chars to anything else (like, spaces).

That, too, was initially a concern of mine. But, when my testing showed that BTsync was able to process the modified sync.dat containing reordered folder data, I concluded that either (1) the text editor saved sync.dat unmolested or (2) BTsync is able to repair a mildly damaged sync.dat file. All is well for now. Fingers crossed.

Link to post
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.

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.