
| Quote: | |
|
CODE: [Copy to clipboard]上面只是个演示脚本,双击后就可自动安装了。@echo off
call :%* 2>nul || goto setup
goto :eof
:Sub1
rem 移动到父目录
set "str=%~nx1"
:loop
if not exist "..\%str%" goto Next
set "str=%~n1_New%~x1"
goto loop
:Next
move "%~nx1" "..\%str%"
goto :eof
:Sub2
rem 脱壳
rem 自己完成
goto :eof
:setup
reg add "hkcr\*\shell\移至父目录\command" /f /t reg_sz /v "" /d "\"%~0\" Sub1 \"%%1\""
reg add "hkcr\Folder\shell\脱壳\command" /f /t reg_sz /v "" /d "\"%~0\" Sub2 \"%%1\""
goto :eof
CODE: [Copy to clipboard]建议一次性大批量选定操作目标测试一下,看看是否会存在同步方面的问题。另外可以在move后面加上写入日志的功能。@echo off
call :%* 2>nul || goto setup
goto :eof
:Sub1
rem 移动到父目录
if not defined str set "str=%~nx1"
if not exist "..\%~nx1" (move "%str%" "..\%~nx1" && set "str=" && goto :eof)
call :Sub1 "%~n1_New%~x1"
goto :eof
:Sub2
rem 脱壳
pushd "%~1"
for %%i in (*.*) do call :Sub1 "%%~dpnxi"
popd
rd "%~1"
goto :eof
:setup
reg add "hkcr\*\shell\移至父目录\command" /f /t reg_sz /v "" /d "\"%~0\" Sub1 \"%%1\""
reg add "hkcr\Folder\shell\脱壳\command" /f /t reg_sz /v "" /d "\"%~0\" Sub2 \"%%1\""
goto :eof
| Quote: | |
|
| Quote: | |
|
CODE: [Copy to clipboard]为什么还要交互呢?:choice
set /p dd=安装A,卸载X,退出T:
call :%dd% || (echo error! && goto choice)
goto :eof
:a
:A
reg .....
goto :eof
:x
:X
reg .....
goto :eof
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |