From: Clement Ow [mailto:clement.ow / asia.bnpparibas.com] 
# I have a folder in C:\movtest\testing\ and i want to leave 
# the last day
# of the mth untouched(which means i dont wanna copy them over 
# to the dest
# path.) For example, I wanna copy any file or folder starting with 2008
# but I want to keep 20080331 which is the last day of the previous mth
# untouched. Is there any way i can put an exception to the command,
# 'FileUtils.cp_r Dir.glob(src), destination' ?

Dir.glob returns an array

irb(main):012:0> Dir.glob("2008*")
=> ["20080331", "2008abc", "2008def", "2008ghi"]

and you can (easily) subtract arrays by the "-" operator

irb(main):014:0> [1,2,3] - [3]
=> [1, 2]

so you can do something like

irb(main):015:0> Dir.glob("2008*") - ["20080331"]
=> ["2008abc", "2008def", "2008ghi"]

kind regards -botp