Jump to content

dpnote

Level 1
  • Posts

    1
  • Joined

  • Last visited

Everything posted by dpnote

  1. I wrote this simple Windows batch file script that you can use to backup all your Evernote notebooks to Google Drive. You can also use Windows' Task Scheduler to schedule the backup as needed. The CMD file is attached. The variable ProgPath specifies the full path of the ENScript.exe file. The Variable BackupFolder sets the backup folder by using Google Drive File Stream. @echo off @rem Use Unicode/65001 code page to support notebooks with non-English locale names chcp 65001 > nul @rem Make sure the Evernote script file is in the right path. set ProgPath="%LocalAppData%\Apps\Evernote\Evernote\ENScript.exe" if Not Exist %ProgPath% echo Error: Cannot find %ProgPath% program file. Exiting. & goto :EOF @rem Build the timestamp to be used for the backup file name for /F %%A In ('WMIC OS GET LocalDateTime ^| Findstr \.') Do @Set B=%%A set Timestamp=%B:~0,8%-%B:~8,6% @rem echo Timestamp=%Timestamp% @rem Specify the backup folder using the generated timestamp set BackupFolder=G:\My Drive\EvernoteBackups\%Timestamp% @echo Backup Folder = "%BackupFolder%" if Not Exist "%BackupFolder%." Mkdir "%BackupFolder%" @rem For each Evernote notebook, call the subroutine to back it up. for /F "delims==" %%i In ('%ProgPath% listNotebooks') Do Call :BackupNotebook "%%i" @echo Done Goto :EOF @rem Subroutine to backup Evernote notebooks :BackupNotebook set NotebookName=%~1 @echo Backing up notebook %NotebookName% ... %ProgPath% exportNotes /q "notebook:\"%NotebookName%\"" /f "%BackupFolder%\%NotebookName%.enex" exit /b BackupEvernote.cmd
×
×
  • Create New...