GoLang1.1 在windows下编译,如何让程序运行时的DOS窗口不显示

2025-04-04 06:23:57
推荐回答(1个)
回答1:

参考使用下面代码: @echo off if "%1" == "h" goto begin mshta vbscript:createobject("wscript.shell").run("%~fs0 h",0)(window.close)&&exit :begin setlocal enabledelayedexpansion set n= set p=D:\My Documents\My Pictures pushd %p% for /f "tokens=*" %%i in ('dir/b/od *.jpg') do ( set /a n+=1 if !n! leq 4 del "%%i" )

求采纳