- @echo off
- set "OldName=新建文本文件.txt"
- set "NewName=bbs.bathome.net"
- for /f "delims=:" %%i in ('findstr /n "^:DynamicScript$" "%~f0"') do (
- more +%%i "%~f0" > "%temp%\GetClip.vbs"
- )
- for /f "delims=" %%i in ('cscript //nologo %temp%\GetClip.vbs') do (
- set "NewName=%%i"
- )
- ren "%OldName%" "%NewName%.txt"
- goto :eof
-
- :DynamicScript
- WScript.Echo CreateObject("htmlfile").parentWindow.clipboardData.getData("Text")
复制代码
|