How do I create a number of folders from txt file?

See Recreate Empty Directory Structure for creating the directories.

For converting spaces to underlines, use a button which runs this command:

@NODESELECT Rename PATTERN=" " TO="_" FINDREP

(The paste file list button may also be of use and is a more literal answer to your question of how create things from a list in the clipboard. I doubt you'll want to use the clipboard when you can just select the folders you want duplicated, though. You'd also have to modify it to create directories instead of files.)