- ::设置压缩包文件后缀类型
- set @tx=rar zip 7z
- setlocal enabledelayedexpansion
- for %%a in (%@tx%) do (
- if /i "%~x1" equ ".%%a" set "@r1=%1"
- if /i "%~x2" equ ".%%a" set "@r2=%2"
- )
- if defined @r1 (
- if defined @r2 (
- set "@r=!@r1! !@r2!"
- ) else set "@r=!@r1!"
- ) else (
- if defined @r2 (
- set "@r=!@r2!"
- ) else set "@r=无"
- )
- echo 您拖放的压缩包文件:!@r!
- pause
复制代码
|