R.H. wrote:

> The similar or same problem as you have: I want to delete the text
> file. The command I issue is "detele file <pathname>". The error it
> returns: "Can't delete file".

LC's result will tell you only the general fact that a file I/O operation failed, but not why.

The syserror() function will tell you why, delivering the specific integer code for the error the OS reported back to LC.

Establishing a habit of always including a call to sysError when reporting a non-empty result will save you countless hours of diagnostic time, e.g.:

  delete file tFile
  if the result is not empty then
      answer the result &" ("& sysError() &")"
  end if


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to