Reputation: 11
I can't believe this hasn't been asked before. I've googled with all queries and quotes and found no result. How the heck can I copy a folder inside jupyter notebook? Like, the whole folder, not just the path, or the files one by one, but the whole folder.
Thanks.
Upvotes: 1
Views: 10105
Reputation: 1293
You can run shell commands from jupyter notebooks using the exclamation mark in front of the command, e.g.
!cp -r /path/to/src /path/to/dest
Upvotes: 1
Reputation: 409
You can just do it like the usual python script.
Here's a solution I found from another question:
from distutils.dir_util import copy_tree
copy_tree("/a/b/c", "/x/y/z")
How do I copy an entire directory of files into an existing directory using Python?
Upvotes: 0