Python. IOError: [Errno 13] Permission denied: when i'm copying file

后端 未结 9 1383
轮回少年
轮回少年 2021-01-03 19:44

I have two folders: In, Out - it is not system folder on disk D: - Windows 7. Out contain \"myfile.txt\" I run the following command in python:

>>>          


        
9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-03 20:09

    use

    > from shutil import copyfile
    > 
    > copyfile(src, dst)
    

    for src and dst use:

    srcname = os.path.join(src, name)
    dstname = os.path.join(dst, name)
    

提交回复
热议问题