Button: all filenames to a text file?

I've been trying to create a button that sends all filenames to a textfile. But after 10 minutes, I think I've given up - I'm just too inexperienced at this. I'm aware of the "dir" command in CMD, but unfortunately it's not a Unicode application, thus a lot of filenames aren't exported with proper filenames.

Can someone help me?

If you don't mind losing your current clipboard contents:

Select All Clipboard COPYNAMES=nopaths Clipboard PASTE AS=ask

Remove the "Select All" if you want it to only apply to selected files/folders.

Remove the "=nopaths" if you want the full paths.

Remove the "=ask" part if you want it to go into a file called "Clipboard Text.txt" automatically. (Or "Clipboard Text (1).txt" etc. if the file already exists.)

I went with:

Clipboard PASTE AS "test.txt"

Works great. Thanks for your great support also!