Python
import os, time, datetime
print("創立時間: " + datetime.datetime.fromtimestamp(os.path.getctime(file)).strftime("%Y-%m-%d %H:%M:%S"))
print("修改時間: " + datetime.datetime.fromtimestamp(os.path.getmtime(file)).strftime("%Y-%m-%d %H:%M:%S"))
程式執行效果如下
C#
using System.IO;