[[HWID Practice Rewrite]] (asking **Perplexity**) > Assume I am a beginner programmer. Every time I push my PowerShell script to a machine in Altiris (or a group of machineqs all at once), I can down either an .html or a `.csv` file report on said task. That report tells me the time it started and completed, whether it passed or failed, and the machine name. All of this info is important. In the future I will need to assemble some sort of report of all the machines we've attempted pushing this script to. --- # New Project: SEU Windows Project #### **Description** This is a space for the work project of us adopting Microsoft infrastructure for managing all the Windows machines on campus (and maybe others, if possible). The first thing we must do is figure out a way to run a script from Microsoft on each machine which will produce a `.csv` with some ID info, and then upload a .`csv` per machine into Autopilot so that we can get the machines into Intune. #### **Instructions** Provide all help and explanations, even if I have a job in IT, as if I am a beginner working in this field. Be expansive in your explanations, and specific in your instructions. If the answer involves code, give me all of the code in a single body with an explanation of what it does, and why you decided it should do it. Then, after that, start quoting smaller chunks of the code to explain each piece on at a time. ## Building a `Go` Program **Perplexity Prompt:** ```md Actually, I've decided 2 different things: My program just needs to JUST read the .csv files for the first main part, which wil all have the same fields: Start Time, End Time, Computer Name, and Status Status can only be "Completed" or "Failed" So, my program needs to read in all the .csv's in the folder, extract rows, normalizes them, writes the combined output The SECOND part of the program will be similar: read all the .html files in the folder, put them together as a single .html file that provides the same report (same fields, same data, etc.). However, I then want to spend time styling and editing that final .html file to make it a presentable page. So, we'll have a final combined .csv of all the data, and a beautiful and modern .html presenting it. Let's ignore the styling for right now, though, and just focus on creating a Go program that does the described above ``` ## Code Walkthrough - Every row from every `.csv` and `.html` has to be converted into a `struct` shape so the rest of the program can sort, de-duplicate, and write output without caring where the rows originally came from - `readAllReports(inputFolder, outputFolder)` is a **dispatcher function** - it walks the folder, checks file extensions, sends `.csv` to the CSV parser, and vice versa. - `WalkDir` is a standard folder-traversal approach in Go