Python or Powershell - Import Folder Name & Text file Content in Folder into Excel
Question: I have been looking at some python modules and powershell capabilities to try
and import some data a database recently kicked out in the form of folders and
text files.

File Structure:

Top Level Folder > FOLDER (Device hostname) > Text File (also contains the
hostname of device) (with data I need in a single cell in Excel)

The end result I am trying to accomplish is have the first cell be the FOLDER
(device name) and the second column contain the text of the text file within
that folder.

I found some python modules but they all focus on pulling directly from a text
doc...I want to have the script or powershell function iterate through each
folder and pull both the folder name and text out.


Answer: This is definitely do-able in Powershell. If I understand your question
correctly, you're going to want to use `Get Child-Item`and `Get Content` then
`-recurse` if necessary. As far as an export you're going to want to use `Out-
File` which can be a hassle when exporting directly to xlsx. If you had some
code to work with I could help better but until then this should get you
started in the right direction. I would read up on the `Get`commands because
Powershell is very simple to write but powerful.

