ユーザーのログイン

MOVONET

トップページ 音楽 MO客 グループ サッカー試合の予約 フォーラム 夜店

登録 | 新則登録| ヘルプ

グループのカテゴリ:ビジネスグループ/メディアグループ   作成者 python    成員人数:11人   グループの状態: 公開    作成日時:2006-12-31  
    
import os
import time
import shutil

today = time.strftime('%Y%m%d')
now = time.strftime('%H%M%S')

from_path    =   "C:\\Program Files\\COSCO\\vsagentlib"

newdir  =   ''.join((''.join((today,'-')),now))

to_path    =   "c:\\image\\"+today
if not os.path.exists(from_path):
    os.mkdir(to_path) # make directory
    print 'Successfully created directory', to_path

to_path    =   to_path+'\\'+newdir

if not os.path.exists(to_path):
    os.mkdir(to_path) # make directory
    print 'Successfully created directory2', to_path

for file in os.listdir(from_path):
    type    =   os.path.splitext(file)[1]
    if type == ".pbd" or type == ".exe" or type == ".ini":
        print from_path
        print to_path
      
        #shutil.copy(from_path+'\\'+file, os.path.join("c:\\image\\"+"backup", file))
        shutil.copy(from_path+'\\'+file, os.path.join(to_path, file))

MOKI-COUNT :0 | 観覧数918 | コメント1
  コメント
  • IP :
  • 良いで   
  • 2008-11-07 11:11:25

検証キーワード: 0+1=