From: Peter Bailey Date: 2011-07-23T04:22:38+09:00 Subject: What's up with "Dir.glob"? Hi, I'm having a hard time understanding why a simple Dir.glob sequence isn't working. I need to interrogate a directory for files that are prefixed with particular letter combinations. I just have to choose them and then ftp them to a distant site. It seems to work for some prefixes, but not others. I'm doing this: Dir.glob("{wdp*.pdf,wrr*.pdf,wip*.pdf,wsl*.pdf,wcr*.pdf}").each do |file| puts file ftp the files away . . . end So, it's sending the "wip" file but not the "wsl" file. It doesn't even do a simple "puts" for the files that it sees. I've attached my script. Thanks a lot, Peter Attachments: http://www.ruby-forum.com/attachment/6442/yurchak.rb -- Posted via http://www.ruby-forum.com/.