{"id":177,"date":"2018-02-16T14:37:09","date_gmt":"2018-02-16T01:37:09","guid":{"rendered":"https:\/\/content.ronella.xyz\/apps\/wordpress\/?p=177"},"modified":"2018-07-18T14:48:13","modified_gmt":"2018-07-18T02:48:13","slug":"make-the-target-folder-always-in-sync-from-the-source-folder-using-beyond-compare","status":"publish","type":"post","link":"https:\/\/www.ronella.xyz\/?p=177","title":{"rendered":"Make the Target Folder always in-sync from the Source Folder using Beyond Compare"},"content":{"rendered":"<ol>\n<li>Create a <strong>folder compare<\/strong> session with <strong>beyond compare<\/strong>\u00a0like the following:<br \/>\n<a href=\"https:\/\/www.ronella.xyz\/wordpress\/wp-content\/uploads\/2018\/02\/sf_to_tf_bc.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-178\" src=\"https:\/\/www.ronella.xyz\/wordpress\/wp-content\/uploads\/2018\/02\/sf_to_tf_bc.png\" alt=\"\" width=\"831\" height=\"533\" \/><\/a><\/li>\n<li>Save the session with a file name without any special characters <em>(e.g. &lt; or &gt;)<\/em> or spaces <em>(i.e. necessary not to confuse the scheduler)<\/em>.<\/li>\n<li>Save the following <strong>beyond compare script<\/strong> to <strong>right-updater.bc<\/strong> file.\n<pre>#Write to right-updater.log\r\nlog normal \"right-updater.log\"\r\n\r\n#Load a folder compare session.\r\nload \"%1\"\r\n\r\n#Confirmation will be set to yes by default. \r\noption confirm:yes-to-all\r\n\r\n#Make the right equals to the left of the loaded folder from the session.\r\nsync mirror:left-&gt;right<\/pre>\n<\/li>\n<li>Save the following <strong>powershell script<\/strong> to <strong>bcrunner.ps1<\/strong> file along the side <strong>right-updater.bc<\/strong> file.\n<pre>#expects 2 command line parameters\r\nparam([string]$script, [string]$session)\r\n\r\n#The beyond compare command to be used.\r\n$cmd=\"C:\\Program Files\\Beyond Compare 4\\BComp.com\"\r\n\r\n#Holds the session argument for the beyond compare command.\r\n$args=\"\"\"$session\"\"\"\r\n\r\n#Write on screen the actual command to be executed.\r\nwrite-output \"$cmd \/silent @$script $args\"\r\n\r\n#Perform the command.\r\n&amp;$cmd \/silent @$script $args<\/pre>\n<\/li>\n<li>Schedule using windows <strong>task scheduler<\/strong> and on the <strong>actions tab<\/strong> fill in the following fields like:<br \/>\n<table>\n<thead><\/thead>\n<tbody>\n<tr>\n<td>Action<\/td>\n<td>Start a program<\/td>\n<\/tr>\n<tr>\n<td>Program\/script<\/td>\n<td>powershell<\/td>\n<\/tr>\n<tr>\n<td>Add arguments(optional)<\/td>\n<td>.\/bcrunner.ps1 right-updater.bc &lt;SAVED_SESSION_FROM_STEP_2&gt;<\/td>\n<\/tr>\n<tr>\n<td>Start in (optional)<\/td>\n<td>&lt;DIRECTORY_OF_BCRUNNER.PS1_FILE_FROM_STEP_4&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><em>Note: Fill-in the other tabs of the scheduler accordingly.<\/em><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Create a folder compare session with beyond compare\u00a0like the following: Save the session with a file name without any special characters (e.g. &lt; or &gt;) or spaces (i.e. necessary not to confuse the scheduler). Save the following beyond compare script to right-updater.bc file. #Write to right-updater.log log normal &#8220;right-updater.log&#8221; #Load a folder compare session. load [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22,18,28,10],"tags":[],"_links":{"self":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/177"}],"collection":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=177"}],"version-history":[{"count":7,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions\/185"}],"wp:attachment":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}