Forum Discussion
Merge contents of multiple txt files in single
I have 3 txt files with sample Content as below:
File 1:
Report Generated Time: 01-02-2021 21:02:10
Total Number of Laptops Reporting Count:10000
Laptops Authorized Count:10001
Laptop(s) Authorization Pending Count:10002
Laptop(s) Duplicate Pending Deactivation:10003
Laptop(s) Newly added since last 24 Hours:10004
Laptop(s) NOT Communicated Since last 45 Days:10005
File 2:
Report Generated Time: 02-02-2021 21:03:14
Total Number of Laptops Reporting Count:20000
Laptops Authorized Count:20001
Laptop(s) Authorization Pending Count:20002
Laptop(s) Duplicate Pending Deactivation:20003
Laptop(s) Newly added since last 24 Hours:20004
Laptop(s) NOT Communicated Since last 45 Days:20005
File 3:
Report Generated Time: 03-02-2021 21:02:34
Total Number of Laptops Reporting Count:30000
Laptops Authorized Count:30001
Laptop(s) Authorization Pending Count:30002
Laptop(s) Duplicate Pending Deactivation:30003
Laptop(s) Newly added since last 24 Hours:30004
Laptop(s) NOT Communicated Since last 45 Days:30005
Objective is to create a master txt file with format as below. Can someone advise.
- AndySvintsSteel Contributor
Crossposted from PowerShell.org.
Will leave it here just in case someone will stumble on this post first:
https://powershell.org/forums/topic/merge-3-text-file-in-single-txt-file/
Hope that helps.