dpnote 1 Posted May 1, 2020 Share Posted May 1, 2020 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 1 Link to comment
zigzagwanderer 3 Posted June 29, 2020 Share Posted June 29, 2020 On 5/1/2020 at 3:44 AM, dpnote said: 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. Is this tool meant to retain the timestamps of the notes once they're converted to Docs? That's my problem with exporting to HTML and manually uploading to GDrive; the metadata is not retained in the export, so the creation and modified dates are all uniform. Link to comment
Level 5* DTLow 5,744 Posted June 29, 2020 Level 5* Share Posted June 29, 2020 14 minutes ago, zigzagwanderer said: Is this tool meant to retain the timestamps of the notes once they're converted to Docs? That's my problem with exporting to HTML and manually uploading to GDrive; the metadata is not retained in the export, so the creation and modified dates are all uniform. This is a script to export to .enex format There is no .html option, and no conversion to "Docs" Link to comment
zigzagwanderer 3 Posted June 29, 2020 Share Posted June 29, 2020 Ah, ok. Thanks @DTLow. My search continues. Link to comment
Level 5* gazumped 12,062 Posted June 29, 2020 Level 5* Share Posted June 29, 2020 Just my opinion, but an export to anything other than ENEX (which is already baked into Evernote) is hardly a 'backup' since it can't be imported back to replace the original note. It's just another copy of the database in another format. Your choice, but if the Apocalypse ever happens I'd bet there will be multiple options to export your database / import to another app at the time... 1 Link to comment
Level 5* DTLow 5,744 Posted June 29, 2020 Level 5* Share Posted June 29, 2020 47 minutes ago, gazumped said: since it can't be imported back to replace the original note About that "replace the original note" Importing a .enex file does not replace the original note - it creates a new note; losing Note-Id and Notebook 2 Link to comment
Level 5* gazumped 12,062 Posted June 29, 2020 Level 5* Share Posted June 29, 2020 Fair point - I should have said provide a carbon copy or something; the point being that a re-saved document is not going to look exactly the same as the original, and if you wanted to re 'import' a notebook from Google a great deal of work would be involved. Enex files for all their limitations (and there are a few...) are good enough for me at the moment. Link to comment
sassoon12 1 Posted April 15, 2021 Share Posted April 15, 2021 On 4/30/2020 at 9:44 PM, dpnote said: 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.cmdUnavailable How do I create a "G" drive connected to my google drive account ? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now