Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("C:\a.txt") '假设a.txt在C根目录下
If objFile.Size > 0 Then
Set objReadFile = objFSO.OpenTextFile("C:\a.txt", 1)
strContents = objReadFile.ReadAll
Wscript.Echo strContents
objReadFile.Close
Else
Wscript.Echo "The file is empty."
End If