2017年12月16日 星期六

Ez Folder Sync

Download v1.1 (macOS 10.10 required)

A easy way to sync or backup files between two folders, even the folder is located in another Mac.

This application is inspired by an article on SSPai.com, and I build a GUI of the script and add something new.

Ez Folder Sync 是在兩個檔案夾間同步或備份檔案的小程式,且兩個檔案夾可位於不同的 Mac。

這個小程式是參考少數派的文章 "文件备份还能怎么玩?试试这条命令",但我製作了圖形介面且加了一點新的內容。


How to use :

1. Launch "Ez Folder Sync" and choose the work mode:

啟動 Ez Folder Sync 並選擇工作模式:

  • Sync: based on the content in the "Sync from" folder, make "Sync to" folder have the same files as "Sync from" folder does. "Sync" function would check the modification records of files, so the files with the same filenames in two folders would be identical eventually, even the inside had been modified.
  • Backup: almost the same as "Sync" function, but it doesn't delete the part of files that don't exist in "Sync from" folder, so the volume of "Sync to" folder would become larger and larger.

  • 同步:基於 "Sync from" 檔案夾的內容,使其與 "Sync to" 的內容物一致。"同步" 功能會檢查檔案的修改紀錄,故若檔案內容改變了,同步的結果還是會讓兩者相同。
  • 備份:功能與 "同步" 幾乎相同,但不會刪除 "Sync from" 上沒有的檔案,又名 "增量備份"。

2. Select the folders. They can be any local directory on the local Mac (if your account has read/write permission of them), or the shared folder on another remote Mac.

選擇資料夾,他們可以是本機的資料夾 (如果你的帳號有該資料夾的讀寫權限),也可以是另一個 Mac 上的分享資料夾。


Access the folder on the another Mac :

1.  Turn on the "File Sharing" (System Preference > Sharing > File Sharing) function of the remote Mac, and add the sync folder into "Shared Folder" list (It's "Temp" in this case).

另一台 (遠端) Mac 上開啟 "檔案共享" (系統偏好設定 > 共享 > 檔案共享),並把欲同步的資料夾加入 "共享檔案夾" 的選單列中 (此例中該檔案夾為 "Temp")。


2. On the local Mac, check the name of remote Mac in the Finder sidebar and connect to the remote Mac via some user account.

在本機 Mac 上,查看 Finder 側邊欄是否有該遠端 Mac 的名字,若有則點選並連接登入該 Mac。

About the login account, I use "Chris", which is my user account on the remote Mac, so I can fully access all files on the remote Mac. In some case, the remote Mac is owned by another person, so you need to ask that guy to create an account in "Users" list for your remote access. The folder access permission could be also easily set in "Users" list via the pop-up menu.

關於登入的帳號,此處我使用 "Chris",即為我在該遠端 Mac 上的帳號,所以我登入之後可以任意存取該帳號下的檔案。如果該 Mac 並不屬於你,可以請該擁有者幫你在 "使用者" 清單下建立一個新帳號,讓你可以遠端登入並存取他共享給你的檔案夾,其存取權限可在 "使用者" 清單中設定。

3. After connecting, the remote sync/backup function of "Ez Folder Sync" can be used. You might find the remote folder is hard to be selected in the path bar menu, so just use "Drag and Drop" method to add the folder into the path bar.

There is something weird, the "Drag and Drop" function should be activated after you open the remote sync folder once in Finder. There is no such a strange issue for any local folder, including that in the mounted external hard drive or USB drive ( /Volume/[Your Drive]/ ).

在連結上了之後,即可使用 Ez Folder Sync 的遠端同步或備份的功能。也許你會發現遠端 Mac 上的資料夾不容易選取,可以直接把該檔案夾拖入軟體的路徑欄中。

這裡有件怪事:必須先將該檔案夾在 Finder 打開過至少一次,才能使用拖拉放的功能,但對於本機的檔案夾則沒有此項限制,即使該資料夾位於外接隨身碟上 ( /Volume/[你的隨身碟名字]/ )。

4. After the work is done, the remote access should be disconnected due to the security concern (If you access remote folders very often, just keep them connected, of course). First, unmount the network drive (remote sync folder):

在同步結束後,由於安全性的考量,應關閉遠端存取 (如果你經常存取該檔案夾,當然就保持連線囉)。首先,卸載該資料夾所處的網路磁碟:


Second, turn off the connection from Finder (local) and System Preference (remote):

第二,關閉在 Finder 中的連結 (本機 Mac) 及系統偏好設定中的檔案共享 (遠端 Mac):


That's it. If any bug is found, please let me know, thank you~

以上,若有任何問題請通知我,感謝各位~


By the way, if the error window pop-up as below, just ignore it. This error message would show up under some circumstances, but the files are still successfully transferred and synced.

順帶一提,如果在某些情境下,看到下面的錯誤訊息視窗,直接忽略即可,檔案已被順利傳輸。

Changelog: v1.1 on 20180120 Add the task completion window (as below) after the transfer work is done.

沒有留言:

張貼留言