批处理Bat实现Photoshop插件半自动安装

2025-11-15 03:00:52

1、下载 插件Portraiture.8BF  CEP3Complete.8bf

2、用记事本新建如下代码的批处理.bat,以查找\Plug-ins文件夹

===========框内复制===

@echo off

Mode con: cols=86 lines=36

:GO

Set This_Path=%cd%

MD TempPSCs6\

cd TempPSCs6\

Set TempPath=%cd%

Set DirFind_Filesname=查找到的路径.txt

Set DirDo_Filesname=满足关键字查找到的路径.txt

Set DirDo_Ineed=目标Plug-ins目录绝对路径.txt

Echo.  >%TempPath%\%DirFind_Filesname%

Cls

echo =======说明区========

Echo.

Echo [Photoshop插件辅助]

Echo 学习-BAT-BAT代码-批处理实现-条件查找Photoshop插件目录

Echo.

Echo 本插件Bat实现以下功能:

Echo 条件查找Photoshop.exe 以正确判断Photoshop\Plug-ins插件目录

Echo.

echo =============S34205==

Echo.

Ping -n 5 127.1>nul

:FindDir

rem 指定待搜索的文件

Echo.

Set "ext=*.8bf

Set "FileName=Photoshop.exe"

Echo 查找目标:%FileName%

Set "string1=CS6"

Echo 关键词1 :%string1%

Set string2=%FileName%

Echo 关键词2 :%string2%

Echo 批处理目录:%This_Path%

Echo 临时的目录:%TempPath%

Echo.

echo 正在搜索%FileName%,请稍候...

Echo.

Echo.

for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (

    if exist %%a:\nul (

        pushd %%a:\

echo 正在查找文件 %file%,到达盘符:   %%a

        for /r %%b in ("*%FileName%") do (

echo 正在查找文件 %file%,到达路径:   %%b

            if /i "%%~nxb" equ "%FileName%" (

                set Findpath=%%b &Echo 找到路径: %%b &Echo. &Echo %%b >>%TempPath%\%DirFind_Filesname%

            )

        )

        popd

    )

)

Rem 判断关键词

findstr "%string1%" %DirFind_Filesname% | findstr "%string2%" >%DirDo_Filesname%

Echo.

Echo.

Echo 当前保存的路径文本内容为:

echo,%str1%

Type %DirDo_Filesname%

echo.

set /p str1=<%DirDo_Filesname%

for %%i in ("%str1%") do (

    set str_Ineed=%%~dpiPlug-ins

)

Echo %str_Ineed% >%TempPath%\%DirDo_Ineed%

Echo 当前保存的目标Plug-ins目录绝对路径内容为:

echo,%str_Ineed%

cd %This_Path%

Echo %cd%

for /f "delims=" %%i in ('dir /b/s/a-d %ext%') do (

Echo 当前目录找到插件文件:%%i  &Set Files8bf=%%i &copy "%%i" "%str_Ineed%\" >nul 2>nul

    ) 

if "%Files8bf%" neq "" (Echo OK , %Files8bf% &Goto Tips) else (Echo. &Echo 当前目录下没有插件文件,为你打开Plug-ins插件目录....... &Ping -n 2 127.1>nul &Start "" "%str_Ineed%\" &Goto out)

:Tips

echo.

Echo.

echo Ok,插件文件已经复制到指定目录,去打开Photoshop查看插件结果吧.........

Echo.

Set "TxtDiy=071122936kfcwggmlxjjdlspp"

mshta vbscript:clipboarddata.setdata("text","%TxtDiy%")(close)

echo.

Echo 可能需要用到的注册码(已经复制到剪贴板):%TxtDiy%

Echo.

echo =======退出区=======

:Out

Echo.

Echo.

Echo 30秒后,退出BAT.....................................................................

Ping -n 30 127.1>nul

Del /a /f /s /q %TempPath%\*.*

exit /b

===========框内复制===

3、好了,启动Photoshop,试试插件吧

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢