Skip to content

Instantly share code, notes, and snippets.

@mipmip
Created August 17, 2015 13:35
Show Gist options
  • Save mipmip/a57270eb9d5c0711dc80 to your computer and use it in GitHub Desktop.
Save mipmip/a57270eb9d5c0711dc80 to your computer and use it in GitHub Desktop.
check all maildir subdir
dir = "/var/customers/mail/wimsnel/aan@wimsnel.nl"
#p Dir.glob(dir)
dirs =Dir.entries(dir).select {|entry|
File.directory? File.join(dir,entry) and !(entry =='.' || entry == '..')
}
dirs.each do |d|
p dir + ':' + d
#p d
sd =Dir.entries(File.join(dir,d)).select {|entry|
File.directory? File.join(dir,entry) and !(entry =='.' || entry == '..')
}
p sd
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment