-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCopyFiles.py
20 lines (16 loc) · 3.24 KB
/
CopyFiles.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python
import shutil
import os, sys
list_of_files_to_copy = ['filename', 'filename','filename','folder/filename']
src = "/folder/folder/folder"
dst = "/home/ec2-user/folder/"
for f in list_of_files_to_copy:
try:
print('Trying to copy: %s'%(src+f))
shutil.copy(src+f, dst)
print('Copied')
except:
print('FAILED!!!')
prntDst = os.listdir(dst)
print 'Destination Dir after copy operation: '
print(prntDst)