code/superant.com.schedule/downloadrwdschedulefiles.rb in rwdschedule-1.01 vs code/superant.com.schedule/downloadrwdschedulefiles.rb in rwdschedule-1.02

- old
+ new

@@ -8,23 +8,20 @@ ftp.debug_mode = false ftp.login($rwdschedule_ftplogin, $rwdschedule_ftppassword) ftp.chdir($rwdschedule_ftpdirectory) print "I'm in the directory ", ftp.pwd(), "\n" schfiles = ftp.nlst($rwdschedule_ftpdirectory) - #puts schfiles - $stderr.print $rwdschedule_updatedirectory schfiles.each {|x| - #adjust the filters to the files you want to see... + #adjust the filters to the files you want to see... - if x =~ /sch/ - #lastslash = x.rindex('/')+1 - #newstring = x.slice!(lastslash..256) - newstring = x - # $stderr.print newstring.to_s - localupdatefile = File.join($rwdschedule_updatedirectory, "#{x}") - ftp.getbinaryfile("#{x}" , localupdatefile ) - @rwdscheduleftpdisplay = @rwdscheduleftpdisplay + newstring + "\n" + if x =~ /sch/ + lastslash = x.rindex('/')+1 + newstring = x.slice(lastslash..256) + + localupdatefile = $rwdschedule_updatedirectory +"/"+ "#{newstring}" + ftp.getbinaryfile("#{x}" , localupdatefile ) + @rwdscheduleftpdisplay = @rwdscheduleftpdisplay + newstring + "\n" end }