September Morn Update

This commit is contained in:
Ingy döt Net 2019-09-12 10:33:56 -07:00
parent 4e2d22a71d
commit aac6731f2c
6856 changed files with 141342 additions and 21127 deletions

View file

@ -0,0 +1,25 @@
Option Explicit
----
Sub DisplayFileSize(ByVal Path As String, ByVal Filename As String)
Dim i As Long
If InStr(Len(Path), Path, "\") = 0 Then
Path = Path & "\"
End If
On Error Resume Next 'otherwise runtime error if file does not exist
i = FileLen(Path & Filename)
If Err.Number = 0 Then
Debug.Print "file size: " & CStr(i) & " Bytes"
Else
Debug.Print "error: " & Err.Description
End If
End Sub
----
Sub Main()
DisplayFileSize CurDir(), "input.txt"
DisplayFileSize CurDir(), "innputt.txt"
DisplayFileSize Environ$("SystemRoot"), "input.txt"
End Sub