Neil,
Borislav's function will not work unless WSH (Windows Scripting Host) is installed on the computer, something you may have to consider. My function is pure VFP code.
>Nope the full code is:
>
>
>loFSO = Createobject("Scripting.FileSystemObject")
>filepath = 'U:\questpdm\picture\whatever.jpg'
>loFile = loFSO.Getfile(filePath)
>
>IF transform(loFile.Size)<= '500000'
> MESSAGEBOX("File Size is OK")
> ELSE
> MESSAGEBOX("File Size is not OK - File Size="+TRANSFORM(loFile.Size))
>ENDIF
>
>
>The message coming back is File size is not OK. The size of my file is 79KB. If I run this the value of lofile.Size is 79997.