From: Newb Newb Date: 2009-01-27T18:49:52+09:00 Subject: Re: Help on Directory Iteration if params[:first_name].blank? and params[:second_name].blank? and !params[:e_date][0].blank? and params[:e_date][1].blank? puts "frtst date is not blank others are blank" Dir.foreach("ChatHistory") do |folder_name| if folder_name == params[:e_date][0] puts "there:" puts folder_name @sub_folder_one = Array.new Dir.foreach(File.join("ChatHistory",folder_name)) do |sub_folder_name| @sub_folder_one << sub_folder_name end end end end @sub_folder_one array has two folder names one is => jayabharathy@angleritech.com~Vs~kannan@angleritech.com second is => testing 14;23;45-jayabharathy@angleritech.com in this i don't need the folder name which has date in that. that i don't need testing 14;23;45-jayabharathy@angleritech.com but i need jayabharathy@angleritech.com~Vs~kannan@angleritech.com how can i do that help me up pls -- Posted via http://www.ruby-forum.com/.