Added filter func in copydir function