共計 319 個字符,預計需要花費 1 分鐘才能閱讀完成。
在 Python 中,可以使用 shutil 模塊來復制文件到指定文件夾。下面是一個示例代碼:
import shutil
# 源文件路徑
source_file = "/path/to/source/file.txt"
# 目標文件夾路徑
destination_folder = "/path/to/destination/folder/"
# 復制文件到目標文件夾
shutil.copy(source_file, destination_folder)
在上面的示例中,你需要將 /path/to/source/file.txt
替換為源文件的實際路徑,并將 /path/to/destination/folder/
替換為目標文件夾的實際路徑。
丸趣 TV 網 – 提供最優質的資源集合!
正文完