import os
import shutil
from os import listdir
from os.path import isfile, join
onlyfiles = [ f for f in listdir('.') if isfile(join('.',f)) and f[-3:] == 'png' ]
for f in onlyfiles:
a = f[:-5]
c = os.path.join(os.getcwd(), f)
print f
for i in range(5):
b = a + str(i+1) + '.png'
print b
dstdir = os.path.join(os.getcwd(), b)
shutil.copy(c, dstdir)
'Develop' 카테고리의 다른 글
cocos2d-x 3.1 addTouchEventListener(std::function) (0) | 2014.06.11 |
---|---|
Visual Studio 바꾸기 정규식 사용 (0) | 2014.06.03 |
[IOS] handleOpenURL & openURL (0) | 2014.02.11 |
ios 빛나는 효과 제거 (0) | 2014.02.06 |
CCLabelTTF 위치 (0) | 2014.01.09 |