Function FileSizeInKB lParameter cFilename Local lcCompatible, lnReturn lcCompatible=Set('compatible') Set Compatible on lnReturn=Fsize('yourfile.xxx') Set Compatible &lcCompatible Return lnreturn/1024>How can i programmatically determine the size of a file in KB? I want to pass a file as a parameter and determine the size. If the size is below 500KB do this if greater then do that.