ported dirs script from web site project