Variables to files

Hi
Is there any way to write a script variable to a file or not

search the forum, it was asked several times.