I got it!!!! file.open works fine in webconsole, but inside script box dont! becouse open method is private.. so this is the code
File.send(:open,'c:\foo.txt', 'wb') {|f| f.write $f }
send "force" access to the method open. i think script box try to access File class and has no access.
Sorry for my english i hope you guys understand and tnx for the help.