在Windows系统中,可以使用以下的bat脚本查找文件夹guid为'72C24DD5-D70A-438B-8A42-98424B88AFB8':

@echo off
setlocal

set "targetGuid=72C24DD5-D70A-438B-8A42-98424B88AFB8"
set "targetFolder="

for /f "tokens=*" %%F in ('dir /s /b /ad') do (
    for /f "usebackq tokens=3 delims=\" %%G in ("%%F") do (
        if "%%G"=="%targetGuid%" (
            set "targetFolder=%%F"
            goto :found
        )
    )
)

:found
if defined targetFolder (
    echo Folder with GUID %targetGuid% found: %targetFolder%
) else (
    echo Folder with GUID %targetGuid% not found.
)

endlocal

将以上的代码保存为一个bat文件(例如"find_folder.bat"),然后双击运行该bat文件,它将在当前系统中递归地查找具有指定GUID的文件夹。如果找到了该文件夹,它将输出文件夹的路径;如果没有找到,它将输出相应的提示信息。

Windows系统中使用bat脚本查找文件夹GUID

原文地址: http://www.cveoy.top/t/topic/p2X2 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录