At 04:48 PM 11/16/00, you wrote:
>Hello again list !
>
>Does anyone know a fullproof way of overwriting a list or text in a 
>"txt.document" using FileIO ? I know this must be easy, but i cant get it 
>to work ....
>
>thanxalot !


Hi,

-- movie script
on overWriteFile pathToFile, newString

   fileObj = new(xtra "fileIO")

   path = pathToFile


   statusOpen = openFile(fileObj, path, 0)

   if statusOpen = 0 then
     delete(fileObj)
   end if

   createFile(fileObj,path)

   openFile(fileObj, path, 0)

   writeString(fileObj,newString)
   closefile(fileObj)
end

-- from message window try
overWriteFile "C:\windows\desktop\new.txt", "newtext"

Ramesh CT
http://www.geocities.com/ramesh_ct/


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to