Cannot create new .txt file

I have, in rightclick -- Customize -- Context Menus -- Lister Context -- Show -- New:

Word file FileType NEW=.doc
Text file FileType NEW=.txt
Zip file FileType NEW=.zip

Word and zip works, that is, creates empty files when clicked. Text does not work. The Command Editor -- Directory Opus looks exactly the same for the three file types with the obvious exceptions (.doc, .txt,. .zip).

Does anyone have any idea what can prevent the .txt file from being created?

Hans L

Oh, let me mention that I have had no problems with the .txt in the past. It stopped working suddenly, but I do not know what the circumstances were.

Check what your .txt filetype is set up for in the registry - maybe something has happened to it.

You should have HKEY_CLASSES_ROOT\.txt.

Then under that, there should be a key called ShellNew.

In that key, there should be a value called NullFile, of type REG_SZ. The data field should be empty.

In .txt\shell, there is

Name: Default
Value: txtfile
Type: REG_SZ

I have changed txtfile to 'empty'.

I'm restarting the computer.

I'll be bakk.

Hans L

Please actually read what I said Hans. The subkey you are looking for is ShellNew, not shell. And by 'empty' I actually mean, empty, not a string composed of the characters 'e', 'm', 'p', 't', 'y'.

I meant empty, not 'empty'. But while I read ShellNew, I later thought "Shell" (tired brain -- funeral, and then very little sleep).

I have created ShellNew. I'll try again.

Regards,

Hans

[quote="jon"]Check what your .txt filetype is set up for in the registry - maybe something has happened to it.

You should have HKEY_CLASSES_ROOT.txt.

Then under that, there should be a key called ShellNew.

In that key, there should be a value called NullFile, of type REG_SZ. The data field should be empty.[/quote]

Hello again, Jon:

I now have what you mentioned above, and still, I cannot create an empty txt file.

Is there anything else I can try?

Regards,

Hans L

Can you right-click on the .txt key and choose Export, and then save it as a text file. Then open it up in notepad, and copy and paste it in here so we can see exactly what you have set.

I give up (trying to figure out which button :slight_smile:

I have this in the lister context menu. Could you give some more details where to right-click.

Hans

Oh, you meant in the registry. Doing it now. I thought you meant in DOpus.

Will paste it in a few.

Hans

Jon, here it is.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT.txt]
@=""

[HKEY_CLASSES_ROOT.txt\shell]

[HKEY_CLASSES_ROOT.txt\shell\open]

[HKEY_CLASSES_ROOT.txt\shell\open\command]
@="notepad.exe %1"

[HKEY_CLASSES_ROOT.txt\ShellNew]
"NullFile"=""

= ===================

Here is what I have in txtfile, should there be any conflict (a shot in the dark as far as I am concerned):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ttffile]
@="TrueType Font file"

[HKEY_CLASSES_ROOT\ttffile\DefaultIcon]
@="%1"

[HKEY_CLASSES_ROOT\ttffile\shell]

[HKEY_CLASSES_ROOT\ttffile\shell\open]

[HKEY_CLASSES_ROOT\ttffile\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,66,00,6f,00,
6e,00,74,00,76,00,69,00,65,00,77,00,2e,00,65,00,78,00,65,00,20,00,25,00,31,
00,00,00

[HKEY_CLASSES_ROOT\ttffile\shell\print]

[HKEY_CLASSES_ROOT\ttffile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,66,00,6f,00,
6e,00,74,00,76,00,69,00,65,00,77,00,2e,00,65,00,78,00,65,00,20,00,2f,00,70,
00,20,00,25,00,31,00,00,00

[HKEY_CLASSES_ROOT\ttffile\shellex]

[HKEY_CLASSES_ROOT\ttffile\shellex\IconHandler]
@="{BD84B380-8CA2-1069-AB1D-08000948F534}"

[HKEY_CLASSES_ROOT\ttffile\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\ttffile\shellex\PropertySheetHandlers\MSTrueTypeProperties]
@="{afc638f0-e8a4-11ce-9ade-00aa00a42d2e}"


Hans

The default value of the .txt key should be txtfile (I suspect you removed this yourself a few messages ago).

Otherwise it looks ok. Try fixing up the default value and see if that solves it - if not, we'll look elsewhere.

Bingo! It now works.

Thank's a million. This has been driving me nuts.

Regards,

Hans L

No worries :slight_smile:

Here's what I've got in the .txt key:

[code]
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT.txt]
@="txtfile"
"PerceivedType"="text"
"Content Type"="text/plain"

[HKEY_CLASSES_ROOT.txt\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT.txt\ShellNew]
"NullFile"=""[/code]

And in the txtfile key (Hans... you pasted the ttffile key???):

[code]
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\txtfile]
@="Text Document"
"FriendlyTypeName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,
00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,
32,00,5c,00,6e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,
00,2c,00,2d,00,34,00,36,00,39,00,00,00
"EditFlags"=dword:00010000

[HKEY_CLASSES_ROOT\txtfile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,
65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,35,
00,32,00,00,00

[HKEY_CLASSES_ROOT\txtfile\shell]

[HKEY_CLASSES_ROOT\txtfile\shell\open]

[HKEY_CLASSES_ROOT\txtfile\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,
00

[HKEY_CLASSES_ROOT\txtfile\shell\print]

[HKEY_CLASSES_ROOT\txtfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,
00,25,00,31,00,00,00

[HKEY_CLASSES_ROOT\txtfile\shell\printto]

[HKEY_CLASSES_ROOT\txtfile\shell\printto\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6e,00,6f,00,
74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,70,00,74,
00,20,00,22,00,25,00,31,00,22,00,20,00,22,00,25,00,32,00,22,00,20,00,22,00,
25,00,33,00,22,00,20,00,22,00,25,00,34,00,22,00,00,00[/code]

As a test... I used TweakUI to delete the Text Document template... which basically just deletes the NullFile string value under ShellNew. Sure enough, Opus did not even SHOW text document under the standard new menu resulting from FileType CONTEXTMENU=Directory\Background (neither did explorer anymore naturally). Curiously, even after trying to recreate the Text Document template using TweakUI - this did not bring it back in Opus though it did come back in Explorer - even after restart Dopus process. I then even tried to re-merge the registry exports above from when things worked (TweakUI creates the registry data a bit different from what's above). Opus STILL does not show the New Text Document under the full new menu mentioned above... but explicitly calling it with FileType NEW=.txt works just fine. Weird... wonder if things will change on the full new menu after a reboot.

"And in the txtfile key (Hans... you pasted the ttffile key???): "

Yes, Steje, I did.

As for the rest, I know that Jon can follow your discussion :slight_smile:

Hans L

I was still putting together my post when you guys worked things out. Glad you got it fixed...

Thank you!

Hans L