3

So I have a directory called /src, which has several contents:

a.png, file.text, /sub_dir1, /sub_dir2

I want to copy these contents into destination directory /dst such that the inside of /dst looks like this (assuming /dst is previously empty):

a.png, file.text, /sub_dir1, /sub_dir2

I have tried shutil.copytree(src, dst), but when I open up /dst I see:

/src

which, although contains everything I want, should not be there, as I do not want the /src directory itself copied over, only its inner contents. Does anyone know how to do this?

user313
  • 681
  • 1
  • 8
  • 21

1 Answers1

0

I made a mistake with the file pathways I inputted into the copytree function. The function works as expected, in the way I mentioned I wanted it to in my question.

user313
  • 681
  • 1
  • 8
  • 21