1. 新建 `tcmd_filenameAddsuff.cmd` ``` @echo off setlocal for /f "tokens=1-3 delims=/ " %%a in ('date /t') do (set mydate=%%a-%%b-%%c) echo %mydate% echo %1 for /f %%i in ('findstr /i .* %1') do ( ren "%%i" "%%~ni--%mydate%%%~xi" ) endlocal ``` 2. `usercmd.ini`中设置命令 ``` [em_filenameAddsuff_here] cmd=cmd /c /path/to/tcmd_filenameAddsuff.cmd param=%F & echo. & pause & exit ``` 3. `wincmd.ini` 中设置快捷键 ``` [1366x768 (8x16)] C+F9=em_filenameAddsuff_here ``` ## 参考 tcmd的特殊参数: http://www.ghisler.ch/wiki/index.php/Buttonbar#Parameter: cmd换行符作为分隔符: http://stackoverflow.com/questions/15641301/new-line-as-delimeter-in-batch-script date命令: http://stackoverflow.com/questions/203090/how-to-get-current-datetime-on-windows-command-line-in-a-suitable-format-for-us cmd的位置参数: http://ss64.com/nt/syntax-args.htmly