Sha256: 0582638d2bdefb2689fb6437a35a5014a7a0cbb3125f0579180cafd2b456ee8e
Contents?: true
Size: 906 Bytes
Versions: 6
Compression:
Stored size: 906 Bytes
Contents
def uploadrwdaddressfiles require 'net/ftp' BasicSocket.do_not_reverse_lookup = true @rwdaddressftpdisplays = "" begin ftp = Net::FTP::new($rwdaddresses_ftpsite) @rwdaddressesftpdisplay = "files uploaded" + "\n" fileListarray = Dir.new($addressfiles_directory).entries.sort.delete_if { |tmpfile| ! (tmpfile =~ /nam$/) } if fileListarray ftp.debug_mode = false ftp.login($rwdaddresses_ftplogin, $rwdaddresses_ftppassword) ftp.chdir($rwdaddresses_ftpdirectory) print "I'm in the directory ", ftp.pwd(), "\n" fileListarray.each do |temp| tmpfilenametoupload = File.join($addressfiles_directory,temp) ftp.puttextfile(tmpfilenametoupload , temp) @rwdaddressesftpdisplay = @rwdaddressesftpdisplay + temp + "\n" end end ftp.close rescue if ftp ftp.close end print "ftp error" end end
Version data entries
6 entries across 6 versions & 1 rubygems