overwriting files with write()

philippe rouxph.22 at gmail.com
Wed Jul 6 22:34:17 CEST 2011


Hi Lukeaaround,

Le 06/07/2011 22:18, lukeaarond a écrit :
> I am saving a string with the function write:
>
> write('name.txt',string);
>
> However, if there is already a file called 'name.txt' in the directory then
> the write() function stops and will not save the string. How do I get
> write() to overwrite files?

use  mputl(string,'name.txt') instead of write('name.txt',string)

"mputl" can overwrite existing files unlike "write".


Philippe.




More information about the users mailing list