From: "Saurabh A." Date: 2011-09-22T18:37:06+09:00 Subject: Unable to close the file, opened using ftp. Hi args = Hash.new args[:SRCHOST] = ENV['AUTO_HOSTNAME'] args[:SRCUSER] = "root" args[:SRCPASSWD] = "" remotefile = File.basename('GlobalText.xml') localfile = File.basename('GlobalText.xml') ftp = Net::FTP.new(args[:SRCHOST], args[:SRCUSER],args[:SRCPASSWD] ) ftp.chdir('/usr/ui/xui/localServerHome/language/en-US') ftp.gettextfile(remotefile, localfile) xmldoc = Document.new(File.new(localfile)) I have a problem in above code, when i am trying to delete the localfile created on local disk, it is giving error saying access denied. How can i delete the local file. For deleting am using File.delete(localfile). Thanks in advance. Please help me in deleting. Thanks Saurabh -- Posted via http://www.ruby-forum.com/.