Contents - Index


GetFile (function)

GetFile( sFileName ) : string

Reads the contents of a disk file. sFilename must include the full path to the file name. This function returns "*Error*" (without the quotes) as the first seven characters of the result if there is an error. The full error message is after this string, so you should really always check for this error just in case there is a problem reading from the disk (or what ever). For example:
  

$Data = GetFile($_AppData + "\test.txt")
IF Left($Data,7) = "*Error*"
  Pause Msg="$Data"
  Cancel
ENDIF


Alpha List         Category List