代码片段
# WIN递归删除
递归删除当前目录下的.idea
和target
文件夹
@echo off
setlocal
set "folder=%~dp0"
for /d /r "%folder%" %%a in (.idea, target) do (
if exist "%%a" (
echo Deleting directory "%%a"...
rd /s /q "%%a"
)
)
echo Done.
pause
递归删除当前目录下的*.iml
文件
@echo off
setlocal
set "folder=%~dp0"
for /r "%folder%" %%a in (*.iml) do (
if exist "%%a" (
echo Deleting file "%%a"...
del /f /q "%%a"
)
)
echo Done.
pause
# WIN递归重命名
递归当前目录,将zh-CN
重命名为zh-CN1
@echo off
for /r "D:\Dev\Landmark\EDT\WellPlan" %%a in (zh-CN) do (
if exist "%%a" (
ren "%%a" "zh-CN1"
)
)
pause
# WIN微信双开
@echo off
start /d "D:\Files\WeChat\" WeChat.exe
start /d "D:\Files\WeChat\" WeChat.exe
# WIN检测IP端口是否开放
$ Test-NetConnection -ComputerName 192.168.1.100 -Port 8080
上次更新: 2024-09-24, 19:37:16