[英]I need to save all .xlsx files in one folder, into another folder
I think I can do this using python, but I'm not sure. 我想我可以使用python做到这一点,但我不确定。
I have a bunch of .xlsx files in a folder (call it User/Data/Input) and I need to save all of them into a different folder (call it User/Data/Output). 我在一个文件夹(称为用户/数据/输入)中有一堆.xlsx文件,我需要将所有文件保存到另一个文件夹(称为用户/数据/输出)中。
Instead of having to open each excel file from the Input folder, and then save it to the Output folder manually, I'd like a program that can do that for me. 无需从Input文件夹中打开每个excel文件,然后手动将其保存到Output文件夹,我想要一个可以为我做的程序。 I do not need to change the workbook names when this occurs, I just need them to be saved in the output folder. 发生这种情况时,我不需要更改工作簿名称,只需要将它们保存在输出文件夹中即可。
Thanks! 谢谢!
shutil.copy(src, dst)
从文档 “复制文件src到的文件或目录DST。如果dst为一个目录,在指定的目录中的src被创建(或重写)相同的基名的文件。许可位被复制。src和dst的是路径以字符串形式给出的名称。”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.