actant 22 Posted June 25, 2019 Share Posted June 25, 2019 I have a .bat file like this: "C:\Program Files (x86)\Evernote\Evernote\enscript.exe" exportNotes /q notebook:zzzz /f C:\000\aaaa.enex "C:\Program Files (x86)\Evernote\Evernote\enscript.exe" exportNotes /q notebook:"z - 000" /f C:\000\aaaa2.enex pause The first command works to give aaaa.enex. But the second command does not give aaaa2.enex. How can I make it work without changing my notebook name? Thanks! 1 Link to comment
Level 5* jefito 5,589 Posted June 25, 2019 Level 5* Share Posted June 25, 2019 Try double-quoting the notebook name using the '\' character. e.g.: "C:\Program Files (x86)\Evernote\Evernote\enscript.exe" exportNotes /q notebook:"\"z - 000\"" /f C:\000\aaaa2.enex 2 1 Link to comment
actant 22 Posted June 25, 2019 Author Share Posted June 25, 2019 7 minutes ago, jefito said: Try double-quoting the notebook name using the '\' character. e.g.: "C:\Program Files (x86)\Evernote\Evernote\enscript.exe" exportNotes /q notebook:"\"z - 000\"" /f C:\000\aaaa2.enex Thanks @jefito It Works! 1 Link to comment
Level 5* jefito 5,589 Posted June 25, 2019 Level 5* Share Posted June 25, 2019 You're welcome. Along those lines, here's a simple backup .bat file I use to back up all of my notebooks:to separate .enex archives. @echo off set enbackup=C:\Archives\Evernote\SimpleBackup set notelist=Notebooks.txt set enscript="c:\Program Files (x86)\Evernote\Evernote\ENScript.exe" echo Backing up Evernote notebooks to %enbackup% if not exist %enbackup% md %enbackup% %enscript% listNotebooks >%notelist% rem del /q %enbackup%\*.enex if exist %enbackup%\*.enex (del /q %enbackup%\*.enex) for /F "delims=" %%a in (%notelist%) do (echo %%a... & %enscript% exportnotes /q "notebook:\"%%a\"" /f "%enbackup%\%%a.enex") dir "%enbackup%\*.enex" set enbackup= set notelist= set enscript= You can set the enbackup variable to a directory of your choosing, or just use . to put them in your current directory Edit: also note the explicit pathing to the ENScript.exe program. That may differ from yoru own installation. 4 1 Link to comment
actant 22 Posted June 25, 2019 Author Share Posted June 25, 2019 22 minutes ago, jefito said: You can set the enbackup variable to a directory of your choosing, o just use . to put them in your current directory @jefito Thank you for sharing the script! 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