daillest319
Programmer
Hi,
Was wondering if someone can help I'm attempting to write a vbscript to check if the file size is bigger than 9,000KB if it is then msg me back the file is bigger than 9,000kb else the file is under 9,000kb.I plan on emailing myself but im fine with the email portion.
Was wondering if someone can help I'm attempting to write a vbscript to check if the file size is bigger than 9,000KB if it is then msg me back the file is bigger than 9,000kb else the file is under 9,000kb.I plan on emailing myself but im fine with the email portion.
Code:
Dim maxFileSize
maxFileSize = 9,000
Set objFSO = createobject("Scripting.FileSystemObject")
strFile= "C:\Test\Database1.accdb"
' need to check if size is greater than 9,000kb
If strFile.size > maxFileSize Then
wscript.echo "file is bigger than 9,000kb"
else
wscript.echo "file is not bigger than 9,000kb"
End If
End If