Create msLockFix.sh

When Microsoft Word or Excel for Mac are disconnected from a file server without properly close an open file, they leave behind an invisible lock file (starts with "~$" ). These lock files remain and cause the file to be opened Read-Only in the future.

This script finds these lock files, checks if the file is definitely open, and if NOT open it will delete the lock file.

Run this script as often as you wish (hourly is fine for a typical Mac server) via launchd or crontab