views:

421

answers:

2

I love the windows 7 sticky note app and need to write a quick script to copy my notes to my iphone (easier than bringing a laptop to meetings). How can I extract my notes from the stick notes file (C:\Users\USER\AppData\Roaming\Microsoft\Sticky Notes\StickNotes.snt). The file stores undo entries, or other meta data, for each note, so I can't simply read n bytes from the start of a note.

Edit: Sample file - http://www.mediafire.com/download.php?qzgkj5gmdek

The encoding is difficult for me to decode. Text fragments aren't continuous, they're broken up by deleted strings (probably allowing for a per-sticky undo), and there aren't any clear delimiters. There is a forensic app that decodes the files. App description, taken from website...

http://www.simplecarver.com/exchange/articles/article-4.html

Structured Storage Extractor is a utility for reading and extracting information from the Structured storage format (ole container) files.

Apparently the data is stored in an OLE stream format. I tried using the PEAR OLE Library but it didn't read the stream properly :/.

+1  A: 

You will need to determine how the data is stored in the file, e.g. it may well use a simple format of breaking the file into sections, with each section having a header saying what the section is, and how long it is.

If Microsoft have not published this (a quick search on Google didn't turn up anything), then you will need to try and determine it your self by looking at some of the files. Also be aware that there is nothing to stop Microsoft changing the format with an update if they choose to do so.

Fire Lancer
Thanks, the encoding is difficult for me to decode. Text fragments aren't continuous, they're broken up by deleted strings (probably allowing for a per-sticky undo), and there aren't any clear delimiters.There is a forensic app that decodes the files. App description, taken from website...[quote]Structured Storage Extractor is a utility for reading and extracting information from the Structured storage format (ole container) files.[/quote] http://www.simplecarver.com/exchange/articles/article-4.html
John Himmelman
Well the file must have data somewhere for all that, if you can provide some sample files I'll take a look at them.
Fire Lancer
A: 

StickNotes data file is a Compound File (a filesystem within a file, an OLE storage container). Although the contents of a compound file are viewable through a compound file reader (http://www.coco.co.uk/developers/CFX.html), I can't find a port of the underlying CF/streams protocol.

Related question: http://stackoverflow.com/questions/3141902/how-to-extract-the-contents-of-an-ole-container

John Himmelman