Asori12
Asori12

Reputation: 133

Copy only the files within a Directory and not the Directory

I'm trying to copy images in a directory using Python 2.7.12. The problem is that I want to only move the files within the Directory and not the Directory. So in bash it would look something like

    cp /path/to/source/* . /path/to/destination

but I want to do this in Python 2.7.12. I know how to copy the directory using things like shutil.copy but you can't add the /* to move the files within the directory. I'm kind of new to python and Stack Overflow so I'm sorry if there is any errors or confusion.

Upvotes: 0

Views: 187

Answers (1)

You could just use cmd terminal if your a windows user. Type in help Robocopy and it should display different options

Upvotes: 1

Related Questions