@echo offfor /f "delims=" %%i in ('dir/b/ad') do (ren "%%i\*.nes" "%%~ni.nes")pause
http://zhidao.baidu.com/question/43360138.html?si=3