Hi,
Can anyone tell us how to return the size of a single file?
The below code works, but if the file is not present it creates a zero-length file with the name of the one we were checking for, so it presumably wouldn't work on a read-only network or an optical drive.
Thanks in advance to anyone that can help.
Can anyone tell us how to return the size of a single file?
The below code works, but if the file is not present it creates a zero-length file with the name of the one we were checking for, so it presumably wouldn't work on a read-only network or an optical drive.
Code:
SUB TestSub() Local Shellline As String LOCAL FileSize AS QUAD 'in the final version, this value will be read from an INI file Shellline="q:\factory\metalwork\fanuc\OMD\transfer.exe" OPEN Shellline FOR BINARY AS #1 FileSize = LOF(1) CLOSE #1 'PrintQuad shows the returned value in a textbox PrintQuad FileSize
Comment