```python
import xlrd
import os
import shutil
data = xlrd.open_workbook('yourexcel.xls')
table = data.sheets()[0]
data_source = "your data source"
save_folder_path = "your target save path"
for i in rang(table.nrows):
one_row = table.row_values(i)
product_id = one_row[0]
folder_name = one_row[1]
save_path = os.path.join(save_folder_path, product_id)
source_path = os.path.join(data_source, folder_name)
if not os.path.exists(save_path):
os.mkdir(save_path)
shutil.move(source_path, save_path)
```
你提问之前请说的详细一些,你的 excel 表格的部分截图,包括你文件目录是什么样子的,上面的代码不保证能运行,你自己改改,需要安装 xlrd, `pip install xlrd`
`python
your_py_file.py`