From: Thomas Luedeke Date: 2012-08-24T08:10:04+09:00 Subject: deleting directories matching a pattern I cannot believe I'm having trouble with this - it should be utterly trivial, but I just can't get Ruby to work correctly on this. I've got a directory with subdirectories that have names such as "Eb97503.120822", where 97503 is a job submission number, and 120822 is a time-date stamp. So the directory contents might look like this: Eb97503.120622 Eb97504.120622 Eb98537.120722 Eb99659.120822 I want to pattern match the job submission number, and delete the directories. I must have tried ten different ways of doing it using strings set with the job submission number, but I just can't get it to work. How the heck do I delete the middle two directories, once I have strings set as: job1 = 97504 job2 = 98537 This is embarrassing.... -- Posted via http://www.ruby-forum.com/.