Jump to content

ENScript: notebook names with spaces


Recommended Posts

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!

  • Like 1
Link to comment
  • Level 5*

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

 

  • Like 2
  • Thanks 1
Link to comment
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!

  • Like 1
Link to comment
  • Level 5*

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.

  • Like 4
  • Thanks 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...