Sha256: d61f5e8f90eba9f7a56260b53b273add6b3b22046a1f5c24a3e0a786636ad885

Contents?: true

Size: 899 Bytes

Versions: 3

Compression:

Stored size: 899 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

3 entries across 3 versions & 1 rubygems

Version Path
rwdschedule-0.9 code/gg0schedules/uploadrwdschedulefiles.rb
rwdschedule-0.91 code/superantc.com.schedule/uploadrwdschedulefiles.rb
rwdschedule-0.92 code/superant.com.schedule/uploadrwdschedulefiles.rb