descention

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by descention

  1. I couldn't find a good solution for defining shares for a portable drive and decided to write a script to help me out. The following AutoIt code allows me to define shares in "sync.conf.portable" with a share directory replacement of "%SD%" to the script directory. I placed this code with my BTSync.exe file, execute the script to launch BTSync, and can now have my share change drive letters from one PC to another.

    ...    "dir":"%SD%\\Share",...

    %SD% will be replaced by the script directory and does not support '..' for going up a directory. Yet.

    #include <OO_JSON.au3>$file = @ScriptDir & "\sync.conf"if FileExists($file & ".portable") Then   $json = FileRead($file & ".portable")   _OO_JSON_Init (  )   $object = _JS_obj_create($json)   $base = $object.objToString()   if @error Then	  ConsoleWrite("Error: " & @error & @crlf)   Endif   $dir = $object.shared_folders.item(0).dir   if StringInStr($dir,"%SD%", True) Then	  $object.shared_folders.item(0).dir = StringReplace($object.shared_folders.item(0).dir, "%SD%",@ScriptDir)   EndIf   FileDelete($file)   FileWrite($file, $object.objToString())   _OO_JSON_Quit (  )EndIfRun(@scriptDir & "\BTSync.exe /config sync.conf",@ScriptDir)

    Forum Link: OO_JSON

  2. I would love to sync just a part of an share.

    For example;

    Let S1 be a share containing directories porject1 and project2.

    S1

    |->project1

    |->project2

    Another computer should able to sync just the directory project1 without syncing project2 from S1 and without configure up a new share.

    In this case you can quickly access a part of an share with less adminitration.

    I would also like to vote for this.