control if event is a directory on created and copy