This will allow to detect if a file is RTF or not. Use with drag and drop mecanism. Good and simple example.