I have a directory (dir_menu) that contains the following files:
dir_menu
 |-menu.htm
 |-menu_lesson.htmt
 |-menu_topic.htmt
 |-launchunitvars.js
I''m trying to remove the two files with the ".htmt"
extensions using the
following line of code:
Dir.foreach("dir_menu") {|f| FileUtils.rm(f) if(f.include?
".htmt")}
I keep getting the following error:
Errno::ENOENT (No such file or directory - menu_lesson.htmt):
Obviously it finds the file otherwise it wouldn''t list the filename in
the error message.  What am I missing here?
-- 
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Nevermind.  Figured it out.  Need to take a different approach.  Ended 
up doing the following for anyone else who wants to know.
Dir.chdir("dir_menu")
FileUtils.rm Dir.glob("*.{htmt,jst}")
-- 
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---