Restructuring files in directories