#到c:\\目錄查詢指定檔案名稱(*.sys) import os,glob os.chdir('c:\\') folder1 = os.getcwd() print('目前目錄=',folder1) file1 = glob.glob('*.sys') print(file1)