import os
for filePath in [entry.path for entry in os.scandir(r'J:\广场舞VCD\2')]:
os.rename(filePath,filePath.replace('.DAT','.MPEG'))
import os
for filePath in [entry.path for entry in os.scandir(r'J:\广场舞VCD\2')]:
os.rename(filePath,filePath.replace('.DAT','.MPEG'))