added z script for directory memory