Python程序将文件从一个文件夹复制到另一个文件夹; PermissionError [Errno 13]

时间:2018-03-01 20:25:03

标签: python windows

我编写了一个小的python程序来帮助我找到确定目录中的所有.mp3文件,然后将它们复制到所需的目录。

我已从Administrator Command Promt执行该程序,但这对我没用。你有什么建议吗?

这是我得到的错误:

import glob

from shutil import copyfile

import time


destination = "Desired Location To Copy The Files To"

files = glob.glob("FolderWithTheMusicFiles/*.mp3")

for file in files:

    copyfile(file, destination)

以下是代码:

ngOnInit(){ 
    this.authorsRetrieved.subscribe( authors => {
        this.allAuthors = authors as Array;
        this.authorsRetrieved = new Array(
            Math.max.apply(Math, this.allTrainers.map(function(t){ return t.trainer_id; }))
        );
// as authors are added and deleted, the author_id won't equal the number of 
// authors, so get the highest id number, create an array that long
// then fill it with blanks so the keys have some value
            this.authorsRetrieved.fill([{}]);
        });

谢谢大家的时间和精力!

0 个答案:

没有答案
相关问题