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