简体   繁体   English

我需要将所有.xlsx文件保存在一个文件夹中,并保存到另一个文件夹中

[英]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.

相关问题 阅读文件夹中的所有xlsx文件,并将文件保存在不同的DataFrame中 - Read all xlsx-Files in a folder and save the files in different DataFrames 如何将文件夹中的所有文件作为输入(一次一个)并在处理后将它们保存到另一个文件夹中? - How to take all files from a folder as input (one at a time) and save them into another folder after processing? 如何将一种特定类型的所有文件从一个文件夹复制到Python中的另一个文件夹 - How do I copy all files of one specific type from a folder to another folder in Python 我需要更新多个文件中的一行,这些文件位于不同的文件夹中,并且都统一在一个文件夹中 - I need to update one line in multiple files which are in different folders and all united in one folder 读取一个文件夹中的所有文件后,如何在python中从一个文件夹跳转到另一个文件夹? - How to jump from one folder to another folder in python after reading all the files in one folder? 如何修改一个文件夹的多个 .xml 文件并将它们保存到另一个文件夹? - How to Modify Multiple .xml files of one folder and save them to another? 从另一个文件夹导入一个文件夹中的文件 - Import of files in one folder from another folder 我有不同的zip文件,每个文件包含一个csv文件。 如何解压缩每个文件夹,并将所有csv文件保存在一个文件夹中 - I have different zip files that contain one csv file each. how do I unzip each folder, and save all the csv files in one folder 在 Python 中将所有文件从一个 SFTP 文件夹归档到另一个文件夹 - Archive all files from one SFTP folder to another in Python 在包含 xlsx 文件的文件夹中搜索值 - Search value in folder with xlsx files
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM