ScriptBAK.

In order to run unix commands in Windows, one can install Git (https://git-scm.com/downloads)
It includes bash.exe command, which can be used to run copytoGT.sh script file.

runBashCopyWatchers.bat  A batch file to run the unix bash script copyWatchers_2.sh in Windows.

@ECHO OFF
cmd /c ""C:\Program Files\Git\bin\bash.exe" --login -i -- YOUR_PATH\copyWatchers_2.sh"

Replace YOUR_PATH by e.g. C:\Users\YOUR_USERNAME\YOUR_DIRECTORY.

copyWatchers_2.sh A script file to copy watchers to app-settings.json in Windows.

#!/bin/sh
tasklist > YOUR_PATH/tasklist.tmp
if grep "GridTracker2" YOUR_PATH/tasklist.tmp; then
  echo "Not copied. GridTracker is running."
else
  awk '/^    "watchers": {/{del=1;print;system("cat YOUR_PATH/DXWATCHER");next} {if(!del)print} /^      "YOUR_WATCHER"/{del=0}' YOUR_PATH/app-settings.json > YOUR_PATH/app-settings-new.json &
  wait
  cp YOUR_PATH/app-settings-new.json C:/Users/YOUR_USERNAME/AppData/Roaming/GridTracker2/Ginternal/app-settings.json
  echo "dxwatchers copied to app-settings.json"
fi

Replace YOUR_PATH by e.g. C:/Users/YOUR_USERNAME/YOUR_DIRECTORY.

NOTE! Between ^ and "watchers" there should be four spaces, and  between ^ and "YOUR_WATCHER" six spaces!