Jump to content

Archived

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

pilotbob

windows Watch folder issue

Recommended Posts

I have noticed that I am getting double copies of notes in my notebooks. I think I figured out what is happening.

 

I am using the evernote watch folder which I have as the save folder for my scanner software. When I scan a document and it gets stored to the folder it is imported into evernote. But, it gets imported again.

 

I think what is happening is that when evernote is running and the files are imported, they are not deleted. Later when I close evernote and start it up again the files are imported again, yet this time they are deleted. 

 

So, I end up getting these scans into my notebooks twice. 

 

Can some one test/verify this? It is quite annoying.

 

BOb

 

Share this post


Link to post

I have noticed that I am getting double copies of notes in my notebooks. I think I figured out what is happening.

 

I am using the evernote watch folder which I have as the save folder for my scanner software. When I scan a document and it gets stored to the folder it is imported into evernote. But, it gets imported again.

 

I think what is happening is that when evernote is running and the files are imported, they are not deleted. Later when I close evernote and start it up again the files are imported again, yet this time they are deleted. 

 

So, I end up getting these scans into my notebooks twice. 

 

Can some one test/verify this? It is quite annoying.

 

BOb

IME, it's best to not scan to an import folder b/c it seems EN may try to import it before you're done with the scan

Also, if you're not done with the scan, the OS will not allow the app to delete the file. IME, it's best to scan to a non-import folder, then coy/move to the import folder after you're done with the scanning.

Share this post


Link to post

Yup.  I can confirm.  I had the same problem and realised that when the scanned file is being deposited in the folder,  Evernote adds it to my database as soon as (in some cases before) the scan is complete.  But the scanner is still closing the file,  so Evernote can't delete it.  So next time you start Evernote it sees "New File!  Yum!" and adds it again.

 

The fix is - change the folder.  Scan to a normal folder and move the files with AHK or some other automation process.

Share this post


Link to post

Yup.  I can confirm.  I had the same problem and realised that when the scanned file is being deposited in the folder,  Evernote adds it to my database as soon as (in some cases before) the scan is complete.  But the scanner is still closing the file,  so Evernote can't delete it.  So next time you start Evernote it sees "New File!  Yum!" and adds it again.

 

The fix is - change the folder.  Scan to a normal folder and move the files with AHK or some other automation process.

 

Ok, as a developer myself I don't accept that "fix". They devs should attempt to open the file for read/write... if that isn't possible (since they will be deleting it) then it shouldn't be imported. The can wait an interval and try again. 

 

Even still, evernote allows you to "keep" the files rather than delete.. so it must have some way to know if it has imported the file already and not do it again.

 

The help does say:

 

"Some users have reported unexpected behavior (e.g., the repeated import of the same file) in Import folders on Windows computers that run automatic backup or anti-virus software. For best results, we recommend that your backup software and anti-virus applications be configured to ignore any Import folders you've created."

 

It doesn't mention don't scan into it. Still, to me this is a bug. 

 

BOb

Share this post


Link to post

Ok, as a developer myself I don't accept that "fix". They devs should attempt to open the file for read/write... if that isn't possible (since they will be deleting it) then it shouldn't be imported. The can wait an interval and try again.

I suppose that they could log the failed access, and go back to the file later, either poll it, or maybe they get a change notification when the file is closed by the scanner software. All of this is speculation, though, unless you know the code and APIs used and their limitations.

Even still, evernote allows you to "keep" the files rather than delete.. so it must have some way to know if it has imported the file already and not do it again.

Not sure that that's quite the case. In Windows they're probably using the Directory Change Notification API at a guess (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365261(v=vs.85).aspx)), or something similar, so they can detect that an import directory has changed, and can then query what the changes are, but in the case of "kept" files, these wouldn't be part of a directory change notification. Even if the directory changed for a different file, the specifics wouldn't include a kept file. Does sort of raises the question if you changed, say, the file date on a kept file, would that trigger the directory change notification for that file?

 

The help does say:

 

"Some users have reported unexpected behavior (e.g., the repeated import of the same file) in Import folders on Windows computers that run automatic backup or anti-virus software. For best results, we recommend that your backup software and anti-virus applications be configured to ignore any Import folders you've created."

 

It doesn't mention don't scan into it. Still, to me this is a bug.

It almost certainly doesn't scan the directory, but uses a notification scheme. Could probably use Spy++ to dope this out, but it's a little late in the evening for me to haul that out. ANyways, the double import here might be caused by the backup or virus software modifying some file metadata (the archive bit?), triggering a directory change notification and subsequent re-import. That'd probably be a different case than the one that you mention.

Again -- a lot of speculation...

Share this post


Link to post

I was able to resolve this. It was "sort of" my scanner software, but it wasn't. There is a setting to view the document after it is scanned... so, the PDF was being opened in Foxit Reader so Evernote was of course not able to delete it. 

 

I still think evernote should somehow keep track of what files were imported if they couldn't be deleted and not double import stuff. But, I've got a solution for now.

 

BOb

Share this post


Link to post

This actually happens independently of the scanning situation you describe.  I use 4 different folders and use a couple different machines.  I get the dupes all the time.  I think it is related to whether EN is open or not.  I am going to try not having them delete automatically.

Share this post


Link to post

I'm also a developer and I, too think this is a "bug" in EN. Not hating on EN - I love it and pay for it, it's very worth it to me.

 

This feature is used almost exclusively for workflow automation. Requiring that some other process writes its files to a non-import folder and then manually copying them to the EN import folder is not workflow automation. And having another program (I saw Belvedere suggested) automatically perform the file move for me is likely to end up with the same problem.

 

However, it's totally possible - and necessary - for EN to attempt to verify that it can lock the file for writing before trying to import it. This will *minimize* (but not eliminate) the possibility of importing partial files. I'll take some improvement over none.

 

I'd love to see this fixed, but overall I'm loving Evernote and want to find more ways to automate stuff that goes into it.

Share this post


Link to post

×
×
  • Create New...