Sha256: d4dde67f89e916c35e5357a20eb4f53eb0de6e55e3e4332d2e527523e7688450

Contents?: true

Size: 929 Bytes

Versions: 13

Compression:

Stored size: 929 Bytes

Contents

def uploadrwdschedulefiles
  require 'net/ftp'
  BasicSocket.do_not_reverse_lookup = true 
   @rwdscheduleftpdisplays = ""
  begin
    ftp = Net::FTP::new($rwdschedule_ftpsite)
@rwdscheduleftpdisplay  = "files uploaded" + "\n" 
    
    fileListarray = Dir.new($rwdschedule_directory).entries.sort.delete_if { |tmpfile| ! (tmpfile =~ /sch$/) }
    if fileListarray
      ftp.debug_mode = false
      ftp.login($rwdschedule_ftplogin, $rwdschedule_ftppassword)
      ftp.chdir($rwdschedule_ftpdirectory)
      print "I'm in the directory ", ftp.pwd(), "\n"
      fileListarray.each do |temp|
             tmpfilenametoupload = File.join($rwdschedule_directory,temp)
             ftp.puttextfile(tmpfilenametoupload  , temp)
             @rwdscheduleftpdisplay  =   @rwdscheduleftpdisplay + temp + "\n"   
        end
      end
   ftp.close
  
rescue
 
 if ftp
 ftp.close
end
print "ftp error"
end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
bigtinker-0.95 code/superant.com.schedule/uploadrwdschedulefiles.rb
bigtinker-0.98 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-0.07 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-1.01 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-0.94 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-0.95 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-0.96 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-0.98 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-0.99 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-0.93 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-0.97 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-1.02 code/superant.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-1.00 code/superant.com.schedule/uploadrwdschedulefiles.rb