Convert file between different type