From: Edward QU Date: 2012-09-17T14:59:42+09:00 Subject: send batch files to FTP server, got Permission denied error message Dear all, I wrote the following script to send some text file under one folder to FTP server, but, while I run it, I got a error message: C:/Ruby193/lib/ruby/1.9.1/net/ftp.rb:662:in `initialize': Permission denied - E:\Dev\robot\test\FTPtest (Errno::EACCES) Any help would be great appreciated. Regards Edward. --------------this is the script---------------------------- require 'net/ftp' require 'find' local_file='E:\Dev\robot\test\FTPtest' server_path='***' begin ftp = Net::FTP::new(ftp_host) ftp.login(username, password) ftp.chdir(server_path) Find.find(local_file ) do |f| ftp.puttextfile(local_file, remotefile = File.basename(f)) end end rescue Net::FTPError $stderr.puts "Couldn't connect." end -- Posted via http://www.ruby-forum.com/.