VB Code:
Option Explicit
Dim oShell, oFSO
Set oShell = CreateObject("Wscript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
Dim sFile, sTempFile, aText, i, aInfo
sFile = "C:\myCompressedFile.doc"
sTempFile = oFSO.GetAbsolutePathName("monfichiertemp.tmp")
oShell.Run "%comspec% /c compact " & Chr(34) & sFile & Chr(34) & " > " & Chr(34) & sTempFile & Chr(34), 0, True
aText = Split(oFSO.OpenTextFile(sTempFile,1).ReadAll,VbCrLf)
aInfo = Split(Replace(aText(4),"=",":"), ":")
WScript.Echo sFile & " : Size = " & Trim(aInfo(0))
WScript.Echo sFile & " : Size on Disk = " & Trim(aInfo(1))
If oFSO.FileExists(sTempFile) Then oFSO.DeleteFile sTempFile, True
Be Aware that this code doesn't consider the bytes that are lost because of the size of the clusters on your disk... it only shows a difference if there's an ntfs compression.