Вы можете использовать Win32 API для Python, который включает в себя модуль COM:
import win32com.client as win32
# it takes a path to a file like "C:\\Users\\user1\\folder\\file.txt"
def getEditingTime(pathToFile):
sh = win32.Dispatch('Shell.Application')
folder = '\\'.join(pathToFile.split('\\')[:-1])
#print("folder : " + folder)
file = pathToFile.split('\\')[-1]
#print("file : " + file)
ns = sh.NameSpace(folder)
listOfCOM = list(ns.Items())
listOfFiles = [str(item) for item in ns.Items()]
#print(listOfFiles)
return ns.GetDetailsOf(listOfCOM[listOfFiles.index(file.split('.')[0])], 159)
# returns the time in the format "00:00:00"