substitute folder with directory