Sub ListDX()
Dim rng As Range
Dim fs, f, f1, fc, s
Dim LastRow As Long
Dim strPath As String
strPath = "C:\DX\" 'This is the Directory the files are located in
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(strPath)
Set fc = f.Files
Set rng = Worksheets(1).Range("A2")
rng.Offset(-1).Resize(, 4).Value = Array("Machine name", "Operating System", "Processor", "Memory")
For Each f1 In fc
Open strPath & f1.Name For Input As #1
Do Until InStr(info, "Memory:")
Line Input #1, info
x = Split(info, ":")
If Trim(x(0)) = "Machine name" Then rng.Value = Trim(x(1))
If Trim(x(0)) = "Operating System" Then rng.Offset(, 1).Value = Trim(x(1))
If Trim(x(0)) = "Processor" Then rng.Offset(, 2).Value = Trim(x(1))
If Trim(x(0)) = "Memory" Then rng.Offset(, 3).Value = Trim(x(1))
Loop
Close #1
info = ""
Set rng = rng.Offset(1)
Next
End Sub