Skip to content

Instantly share code, notes, and snippets.

@qqobb
Created January 17, 2022 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qqobb/65a3282493f85f0f0363e68cdb3dbb1e to your computer and use it in GitHub Desktop.
Save qqobb/65a3282493f85f0f0363e68cdb3dbb1e to your computer and use it in GitHub Desktop.
Start Zotero and redirect the debug output logging to a text file.
:: Name : zotero_log.cmd
:: Purpose : Start Zotero and redirect the debug output logging to a text file.
:: Details : CMD batch script for Windows, tested on Windows 10.
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
SET scriptdir=%~dp0
SET scriptname=%~n0
SET zoteropath=C:\Program Files (x86)\Zotero\zotero.exe
:: logfile's name: [scriptname]_YYYY-MM-DD_HH_MM_SS.txt
:: https://stackoverflow.com/a/19163883
FOR /f %%a IN ('powershell -Command "Get-Date -format yyyy-MM-dd_HH_mm_ss"') DO SET datetime=%%a
SET logfile=%scriptdir%\%scriptname%_%datetime%.txt
:: https://www.zotero.org/support/debug_output#logging_to_a_terminal_window
"%zoteropath%" -ZoteroDebugText > "%logfile%"
EXIT /B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment