GSAK (Geocaching Swiss Army Knife)
Contents - Index

PutFile (function)

PutFile(sFilename, sData) : string

Creates a file to store data. 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 writing to disk (or what ever). For example:

$Data = PutFile($_AppData + "\test.txt","Some saved Setting")
IF Left($Data,7) = "*Error*"
  Pause Msg="$Data"

Related : AppendFile() FileRead

Alpha List         Category List

Copyright 2004-2016 CWE Computer Services  
Privacy Policy Contact