Disable/enable directory field during/after generation