Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ファイルの比較(size-108MB)
- import time
- filePathA = r"F:\username\maya\projects\maya2016\scenes\XX\textures\test.1002.tga"
- filePathB = r"P:\XX\username\Textures\test.1002.tga"
- timer = time.time()
- import filecmp
- if filecmp.cmp(filePathA, filePathB):
- print time.time() - timer
- timer = time.time()
- import datetime
- fileDateA = datetime.datetime.fromtimestamp(os.path.getmtime(filePathA)).strftime('%Y%m%d%H%M%S')
- fileDateB = datetime.datetime.fromtimestamp(os.path.getmtime(filePathB)).strftime('%Y%m%d%H%M%S')
- if fileDateA == fileDateB:
- print time.time() - timer
- # # 1回目
- # 1.7460000515
- # 0.00499987602234
- # # 2回目
- # 0.00500011444092
- # 0.00200009346008
- # # 3回目
- # 0.0019998550415
- # 0.0019998550415
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement