Jump to content

Suggestion: drag-and-drop multiple txt files


Leozin

Recommended Posts

Posted

Hi

What about this: I have a folder in which I keep some unchangeable txt files, just for simple consultation. I'd like to port their content as notes inside a notebook in Evernote.

If I create a notebook and just pick those txt files and drag onto a new note, they'll be added as attachments, like you see in the following picture, and won't be searcheable; let's just remember we're talking about simple plain text.

 

http://i.imgur.com/xaju4OX.jpg

 

So, to avoid the hassle of opening all those txt files one by one and creating notes with them, what about implementing a function to take automatically those files as notes and use their filenames as the title?

 

Thanks for your attention!

  • Level 5*
Posted

You can use the Evernote command-line program ENScript.exe (it's part of a standard Windows Evernote client installation) to accomplish most of this. For example, if you have text file ABC.txt:

  • Open a command shell, and change to the directory where ABC.txt exists
  • Verify that ENScript.exe can run (you should be able to run it straight away, but you might need to explicitly path to it)
  • Use the "createNote" command with the "/s" option to import a text file into Evernote: ENScript createNote /s <ABC.txt

This will work on any text file; they don't need to have the .txt extension.

 

Note: the notes will come in with the title "Untitled Note". Not sure of an easy way around that, though you can use the "/i" option to set your note title.

Posted

Thanks jefito! I could do exactly the thing by setting up a .bat file to run the series of commands for each txt file. The only problem is, batch files don't work well with character encoding. There are lots of files with accents and special characters on their names and I couldn't manage it automatically; I had to build, then, a semi-automatic AutoHotKey script to accomplish 122 files.

 

So, I believe my suggestion stands! :)

 

Thanks again! 

  • Level 5*
Posted

I wonder whether PowerShell might handle Unicode files better.

Posted

And one more thanks. I'll try using Powershell instead of cmd from now on. :)

  • Level 5*
Posted

If you try PowerShell, I hope that you'll remember to report back here with your results (good or bad) -- it might help out other users. Thanks.

  • Level 5*
Posted

Hi

What about this: I have a folder in which I keep some unchangeable txt files, just for simple consultation. I'd like to port their content as notes inside a notebook in Evernote.

If I create a notebook and just pick those txt files and drag onto a new note, they'll be added as attachments, like you see in the following picture, and won't be searcheable; let's just remember we're talking about simple plain text.

 

http://i.imgur.com/xaju4OX.jpg

 

So, to avoid the hassle of opening all those txt files one by one and creating notes with them, what about implementing a function to take automatically those files as notes and use their filenames as the title?

 

Thanks for your attention!

 

In the Mac, this works. If you can get access to a Mac, just drag them in. I did this with a few thousand text notes last week.

Posted

If you try PowerShell, I hope that you'll remember to report back here
with your results (good or bad) -- it might help out other users.
Thanks.

 

Sure, it did work. Too bad I still can't understand why haven't I have any problems with character encoding since I started using a computer.

 

So, does this work on the Mac? But why isn't the very same feature supported on Evernote for Windows? GrumpyMonkey, what exactly did you do? Did you create a notebook then just dragged and dropped X txt files onto that, so the contents became the notes' contents, and the filenames became their titles??

Posted

Dragging one text file onto the Evernote window just adds text. Dragging multiple text files onto the window does what you have found and attaches them.

You can select the files, right click and choose sent to -> Evernote.

This should add them all as separate notes containing the text of the note.

I believe that the notes aren't titled by the filename, but rather the first lines of the file is used for the title.

  • Level 5*
Posted

If you try PowerShell, I hope that you'll remember to report back here

with your results (good or bad) -- it might help out other users.

Thanks.

 

Sure, it did work. Too bad I still can't understand why haven't I have any problems with character encoding since I started using a computer.

 

So, does this work on the Mac? But why isn't the very same feature supported on Evernote for Windows? GrumpyMonkey, what exactly did you do? Did you create a notebook then just dragged and dropped X txt files onto that, so the contents became the notes' contents, and the filenames became their titles??

I just drag them onto the Evernote icon in my dock (on my Mac), because I only have one notebook, but you can also drag them into a notebook. The notes are created with the filenames as the title and the content of the text files as the content of the notes. It works fine with Chinese, Japanese, English, and various combinations of accents (I have notes with macrons in the titles āīūēō). It is usually OK with about 6,000 notes at a tiime, but 10,000 or so might crash the app. It's OK, it restarts just fine, and the processing works, but this is the only hiccup I experience.

Windows, is a whole other app run by an entirely different team. There are all kinds of things on Windows that you will not find on Mac. In this case, the Mac team has done a great job of making this work well.

I should say that it is possible to run into encoding problems on the Mac that make the text files into attachments (very annoying), but it has to do with Asian character encoding (http://discussion.evernote.com/topic/29148-tip-bug-report-utf-16-and-utf-8-encoding-for-text-files/), and is probably not relevant for you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...