Skip to content

Instantly share code, notes, and snippets.

@t-wolfeadam
Last active May 4, 2021 16:20
Show Gist options
  • Save t-wolfeadam/eb25f7cc8ee2b42ed5ce2c6ce1214460 to your computer and use it in GitHub Desktop.
Save t-wolfeadam/eb25f7cc8ee2b42ed5ce2c6ce1214460 to your computer and use it in GitHub Desktop.
My personal backup/restore script for AnyLogic preferences - useful for preserving settings that get reverted by a reinstall/update (Note: Needs to be manually updated between minor AL versions)
@echo off
rem USE AT YOUR OWN RISK.
rem Put this file inside of the folder `.AnyLogicEDITION` (within your user folder),
rem then execute it and follow the (simple) prompts.
rem The backup process saves preferences that get wiped during reinstallation.
rem Specifically, the ones I'm targetting:
rem * The sections in the properties window that are expanded/collapsed
rem * Console output limit setting
rem * Number of shown recently opened models
rem * Some other miscellaneous settings (e.g., preview for renaming)
set /p action=Which action: [b]ackup or [r]estore?
if %action%==b (goto backup)
if %action%==r (goto restore)
echo Invalid action: %action%
pause
goto :eof
:backup
jar -cMf anylogic-preferences-backup.zip ^
Workspace8.7\.metadata\.plugins\com.anylogic.properties.tabbed ^
Workspace8.7\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.anylogic.ui.prefs ^
Workspace8.7\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.anylogic.preferences.prefs ^
Workspace8.7\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.debug.ui.prefs
pause
exit
:restore
jar xf anylogic-preferences-backup.zip
pause
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment