p = Pathname.new(‘c:\Download\’)
elenco_file = p.entries # passa all’array i valori della directory
elenco_file_txt = elenco_file.select {|entry| entry.to_s =~ /pdf/ }.sort
puts elenco_file_txt[0] # invia a video il risultato
contatore_file = 0
while elenco_file_txt[contatore_file] = nil {
puts elenco_file_txt[contatore_file]
contatore_file=contatore_file+1
}
print “non esistono file txt”
end
SyntaxError: compile error
txt_to_ics_2.rb:20: syntax error, unexpected ‘{’, expecting kDO_COND or
‘:’ or ’
\n’ or ‘;’
txt_to_ics_2.rb:23: syntax error, unexpected ‘}’, expecting $end
from txt_to_ics_2.rb:23