Hello Rwmol,
You could use the command below to set all .txt files on say the C: drive to be hidden. It will not hide any .txt files that are considered to be Windows 7 system files due to access denied though, but it will all other .txt files found on the C: drive.
If you like, you could substitute
C with any drive letter that you would like to hide .txt files in, or substitute
C:\ with the full path of a specific folder that you would like to hide all .txt files in it and it's subfolders.
File and Folder - Hide or Unhide ATTRIB +H "C:\*.txt" /S /D
Hope this helps,
Shawn