You check the registry. In Vista (should be same in xp), look at key HKEY_CLASSES_ROOT/.txt/ShellNew/ItemName

not too difficult, really.