Move a file to corresponding directory