Renaming and moving files to appropriate location