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?