Code: Select all
from ctypes import *
from ctypes.wintypes import *
superSearch=windll.LoadLibrary(r"Everything64.dll")
superSearch.Everything_SetSearchW(c_wchar_p("*.mp3"))
superSearch.Everything_SetSort(13)//sort by DATE_MODIFIED_ASCENDING
superSearch.Everything_QueryW(1)
strBuff=create_unicode_buffer(255)
num=superSearch.Everything_GetNumResults()
for i in range(num):
superSearch.Everything_GetResultFullPathNameW(i,byref(strBuff),len(strBuff))
print(strBuff.value)
here some comment on Everything offical website
Is there any advice? Thanks a lot.It is possible the sort is not supported,, in which case after you have received your results you should call *Everything_GetResultListSort to determine the sorting actually used.