0

So the current setup is similar to below where we are copying items from inside the scope folder to another folder. Whatever is inside /1/scope/ needs to go to the other /1/scope and so on. I would just manually copy the items here, but there are over 1000 different folders this needs to be done to. Is there a way to write a program that will go through test/subtest/### and place the scope items in the newfold/sebtest/mathcing number/scope folder?

Folder to copy from: test/subtest/1/scope/ Folder to copy from: test/subtest/2/scope/ Folder to copy from: test/subtest/4/scope/

Folder to move to: newfold/sebtest/1/scope Folder to move to: newfold/sebtest/2/scope Folder to move to: newfold/sebtest/4/scope

Lenormju
  • 4,078
  • 2
  • 8
  • 22
justin
  • 1
  • 1
  • https://stackoverflow.com/questions/1868714/how-do-i-copy-an-entire-directory-of-files-into-an-existing-directory-using-pyth This would be your answer i think. – Jason Chia Sep 10 '21 at 14:24
  • Does this answer your question? [How do I copy an entire directory of files into an existing directory using Python?](https://stackoverflow.com/questions/1868714/how-do-i-copy-an-entire-directory-of-files-into-an-existing-directory-using-pyth). If you are using Python 3.8+, the `dirs_exist_ok` is handy. – Lenormju Sep 10 '21 at 20:02
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 16 '21 at 14:11

0 Answers0