[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[文件操作] 批处理如何获取子目录下exe的绝对路径并替换\为\\再替换到文本的特定位置?

最近使用sublime text3打代码,因为目前正在学习前端html5+css3+javescript+jqueru,这款编辑器可以说对我帮助很大
但每次测试兼容,需要切换不同浏览器,都要去改路径,太花时间。因情况我需要经常换电脑,别人下这些浏览器我还不知道,就算下了,路径可能又不同。我还得再去改。
我希望能把sublime text3装在U盘作为便携版使用
调用八大主流浏览器,还有些有名气浏览器来进行测试

sublime text3默认修改浏览器文件在
  1. 主目录\Data\Packages\User\SideBarEnhancements\Open With
复制代码
  1. {
  2. "caption": "这里是浏览器名",
  3. "id": "side-bar-files-open-with-seamonkey",
  4. "command": "side_bar_files_open_with",
  5. "args": {
  6. "paths": [],
  7. "application": "这里是浏览器路径,但必须是//双符号才行", // WINNT
  8. "extensions":"", //open all even folders
  9. "args":[]
  10. },
  11. "open_automatically" : false // will close the view/tab and launch the application
  12. },,
复制代码
打开【Side Bar.sublime-menu】文件后,caption后是文件名,而【application】后就是路径

我目前想在父目录下创建个【浏览器名称】
比如\浏览器\chrome谷歌浏览器\chrome.exe
\浏览器\firefox火狐浏览器\firefox.exe
......

子目录的2级文件夹名就是caption后浏览器名,输入到【caption】后【""】里,而绝对路径先替换\到\\。再输入到【application】后【""】

不知能否使用bat来实现呢?目前还没学javescript,对循环函数方面还是不太了解,只能等今后再学习了。

现在特别需要能够放在U盘使用sublime text3的浏览器打开,不知大家能否实现这个功能?
我觉得实现这功能需要用到循环会比较多,进行判断再输入。最后保存

已把设置文件发到附件,大家可以参考,需要sublime text3回复下,我直接发一下作为参考,这款各种快捷键特别方便,各种插件。可能用来写bat,支持高亮和符号补全。在类型选【batch File】
1

评分人数

    • pcl_test: 发帖前先使用论坛搜索PB -4

描述很长但我没看明白
举个栗子
  1. for /f  "delims=" %%a in ('dir /a-d/b/s *.exe') do set f=%%a&call echo;%%f:\=\\%%
  2. pause
复制代码
另外,难道不支持相对路径

TOP

本帖最后由 867258173 于 2016-11-6 17:14 编辑

回复 2# pcl_test


    对,要是支持相对路径,我可以像bat加个%CD%就能解决。然而sublime这款编辑器,调用的文件不支持相对路径,路径还是\\,这点和注册表有些像。
但不同点,其中需要的逻辑思维就多了些


1.要判断多个不同exe路径在子目录下路径名
比如在bat文件夹下,\浏览器\定义名称\浏览器名称.exe


2.判断完后需要再进行两次判断。一就是目录下第二层文件名,也就是【定义名称】输入到【caption】后【""】里的路径,比如
  1. "caption": "谷歌浏览器,这是可以自定义的",
复制代码
二就是最重要的路径名
  1. "application": "E:\\编程\\Sublime Text Build 3103\\浏览器\\Google Chrome\\chrome.exe", // WINNT
复制代码
这样就是完整的输入结果

3.要输入的对象没有后缀,视情况需要给文件添txt后缀,修改完再删除后缀进行保存


只是单纯输出路径结果或到txt文档,这我还是明白点,但要是这么多条件组合起来,我就不知道怎么写bat。

TOP

  1. @echo off&Title 获取程序所在的目录名&setlocal EnableExtensions
  2. cd /d "%~dp0"
  3. for /f "delims=" %%I in ('DIR /S /B /A:-D *.exe') do set "ExePath=%%~I"&call :args
  4. Endlocal&pause&exit
  5. :args
  6. SET "caption=%ExePath:\=" "%
  7. for %%I in ("%caption%) do SET "caption=%%~I"
  8. set "application=%ExePath:\=\\%"
  9. ECHO,%caption%
  10. ECHO,%application%
  11. ECHO,请把以上两个参数替换到对应的地方即可。&ECHO,&ECHO,
  12. goto :eof
复制代码

TOP

保存为bat运行
  1. /*&cls
  2. @echo off
  3. (for /f "delims=" %%a in ('dir /a-d/b/s *.exe') do @echo;%%a)|cscript -nologo -e:jscript "%~f0"
  4. pause&exit
  5. */
  6. var fso=new ActiveXObject('Scripting.FileSystemObject');
  7. var text=fso.OpenTextFile(WSH.ScriptFullName, 1).ReadAll();
  8. var files=WSH.StdIn.ReadAll().split(/[\r\n]+/);
  9. WSH.Echo(text.match(/\/\*[\s\S]+?\*\//g)[1].replace(
  10.     /\/\*(\[[\s\S]+?\[)(\s+?\{[\s\S]+\})(\s+?\][\s\S]+?\])\*\//,
  11.     function(a,b,c,d){
  12.         var t=[];
  13.         for(var i=0;i<files.length;i++){
  14.             var s=c.replace(/程序名/, files[i].replace(/.+\\([^\\]+)\\[^\\]+$/,'$1'));
  15.             var s=s.replace(/程序路径/, files[i].replace(/\\/g,'\\\\'));
  16.             t.push(s);
  17.         }
  18.         return b+t.join(',\r\n')+d;
  19.     }
  20. ))
  21. /*[
  22.     {"id": "side-bar-files-open-with",
  23.         "children":
  24.         [
  25.            {
  26.               "caption": "程序名",
  27.               "id": "side-bar-files-open-with-seamonkey",
  28.               "command": "side_bar_files_open_with",
  29.               "args": {
  30.                           "paths": [],
  31.                           "application": "程序路径", // WINNT
  32.                           "extensions":"", //open all even folders
  33.                           "args":[]
  34.                       },
  35.               "open_automatically" : false // will close the view/tab and launch the application
  36.            }
  37.         ]
  38.     }
  39. ]*/
复制代码

TOP

本帖最后由 867258173 于 2016-11-7 01:14 编辑

回复 4# CommandBatCmd
回复 5# pcl_test


这么晚了,辛苦两位了。
目前只在cmd里显示了\\完整路径,但还没实现最终目标。

没进行到输出结果到【bat所在目录\Data\Packages\User\SideBarEnhancements\Open With\Side Bar.sublime-menu】这个没后缀的文件内。

另外for的*.exe可以不用加这个条件,一般是要得到目录下所有exe路径名需要*,但既然已经知道要定义的exe名称是什么,就可以,直接写程序名就好,这样反而节省了for的时间
  1. (for /f "delims=" %%a in ('dir /a-d/b/s chrome.exe') do @echo;%%a)|cscript -nologo -e:jscript
  2. "%~f0"
  3. (for /f "delims=" %%a in ('dir /a-d/b/s firefox.exe') do @echo;%%a)|cscript -nologo
  4. -e:jscript "%~f0"
  5. (for /f "delims=" %%a in ('dir /a-d/b/s 世界之窗深度单文件版.exe') do @echo;%%a)|cscript -nologo
  6. -e:jscript "%~f0"
  7. ......
复制代码
步骤感觉已经完成了一半。再加上以上自定义的程序名,限定了程序的路径。就差直接输出到【Side Bar.sublime-menu】这个没后缀的文档内


另外1楼我发的附件里文件里,不用在意【caption】和【application】""的内容,直接全部删掉测试就好,毕竟定义输出到空的元素内,总比替换元素本身内容要容易一些。

TOP

用反斜杠就好了。
1

评分人数

去学去写去用才有进步。安装python3代码存为xx.py 双击运行或右键用IDLE打开按F5运行

TOP

本帖最后由 867258173 于 2016-11-7 09:56 编辑

回复 7# codegay


还真可以, 现在想起来CSS的路径也得使用/下划线,但虽然知道限定条件减少了,关键的输出到文件还是没有一点解决方法,因为输出对象本身没后缀,也无法直接定义后缀搜索。格式是JSON、是搜索后新建个txt替换内容,还是直接先把对象本身加个txt再进行输入,其实只要能完成最终效果,过程多个步骤也没事

TOP

  1. @echo off&Title 完整测试代码&setlocal EnableExtensions
  2. :::::::::::::::::::::::::::::::::::::::::::
  3. (FOR %%I IN (Z Y X W V U T S R Q P O N M L K J I H G F E D C) DO IF EXIST "%%I:\" set "RootDir=%%I:")&call :CreateDir&@rem 此条测试使用。
  4. if not exist ".\Data\Packages\User\SideBarEnhancements\Open With" md ".\Data\Packages\User\SideBarEnhancements\Open With"
  5. SET "FilePath=.\Data\Packages\User\SideBarEnhancements\Open With\Side Bar.sublime-menu"
  6. .>"%FilePath%" 2>nul&@rem 清空文件Side Bar.sublime-menu的内容,如果需要就备份。
  7. call :head
  8. %Core% SET "Program=chrome.exe firefox.exe SogouExplorer.exe"&@rem 定义的exe文件名要避免cmd命令行上的特殊字符;除此以外程序对已存在的路径中的特殊字符不敏感。
  9. %Core% FOR %%I IN (%Program%) DO for /f "delims=" %%J in ('DIR /S /B /A:-D "%%~I"') do if /I "%%~nxJ"=="%%~I" (set "ExePath=%%~J"&call set "application=%%ExePath:\=\\%%"&call :args&call :Build)
  10. call :end
  11. notepad "%FilePath%"&rd /s /q "%RootDir%\%TestDir%" 2>NUL&@rem 此条测试使用。
  12. Endlocal&exit
  13. @rem 获取程序所在的目录名称。
  14. :args
  15. %Core% SET "caption=%ExePath:\=" "%
  16. %Core% for %%I in ("%caption%) do SET "caption=%%~I"
  17. goto :eof
  18. :::::::::::::::::::::::::::::::::::::::::::
  19. @rem 文件中间的可变部分。
  20. :Build
  21. set /p"= {"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  22. set /p= "caption": "%caption%",<nul>>"%FilePath%"&echo,>>"%FilePath%"
  23. set /p"= "id": "side-bar-files-open-with-seamonkey","<nul>>"%FilePath%"&echo,>>"%FilePath%"&echo,>>"%FilePath%"
  24. set /p"= "command": "side_bar_files_open_with","<nul>>"%FilePath%"&echo,>>"%FilePath%"
  25. set /p"= "args": {"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  26. set /p"= "paths": [],"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  27. set /p= "application": "%application%", // WINNT<nul>>"%FilePath%"&echo,>>"%FilePath%"
  28. set /p"= "extensions":"", //open all even folders"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  29. set /p"= "args":[]"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  30. set /p"= },"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  31. set /p"= "open_automatically" : false // will close the view/tab and launch the application"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  32. set /p"= },"<nul>>"%FilePath%"&echo,>>"%FilePath%"&echo,>>"%FilePath%"
  33. goto :eof
  34. @rem 文件的固定尾部。
  35. :end
  36. set /p"= {"caption":"-"}"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  37. set /p"= ]"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  38. set /p"= }"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  39. set /p"=]"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  40. goto :eof
  41. @rem 文件的固定头部。
  42. :head
  43. set /p"=["<nul>>"%FilePath%"&echo,>>"%FilePath%"
  44. set /p"= {"id": "side-bar-files-open-with","<nul>>"%FilePath%"&echo,>>"%FilePath%"
  45. set /p"= "children":"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  46. set /p"= ["<nul>>"%FilePath%"&echo,>>"%FilePath%"
  47. goto :eof
  48. @rem 模拟附件“Side Bar.sublime-menu”中的文件路径,测试使用。
  49. :CreateDir
  50. FOR /F "delims=" %%I IN ('DIR /B /A:D "%RootDir%\"') DO for /F "eol=  skip=5 tokens=1 delims=" %%J in ('dir "%RootDir%\%%~I" /w /a') do if "%%J"=="[.]  [..] " (SET "DirExist=%%~I")
  51. :loop
  52. set TestDir=%RANDOM%
  53. IF "%DirExist%"=="" (if exist "%RootDir%\%TestDir%\" (goto :loop) else (md "%RootDir%\%TestDir%")) else (set "TestDir=%DirExist%")
  54. cd /d %RootDir%\%TestDir%
  55. md "%RootDir%\%TestDir%\360安全浏览器\360se7.0.0.180"
  56. md "%RootDir%\%TestDir%\Google【谷歌浏览器 (Google Chrome) 35.0.1916.114 绿色免安装版+便携版 - 精品绿色便携软件】Chrome_35.0.1916.114_PortableSoft\GoogleChromePortable\App\Google Chrome"
  57. md "%RootDir%\%TestDir%\OperaNextPortable"
  58. md "%RootDir%\%TestDir%\pcxFirefox-46.0-zhCN-vc2013-x86-sse2-betterpgo-160430\firefox"
  59. md "%RootDir%\%TestDir%\SafariPortable"
  60. md "%RootDir%\%TestDir%\SogouExplorer"
  61. md "%RootDir%\%TestDir%\傲游浏览器\111\Bin"
  62. md "%RootDir%\%TestDir%\桌面\1\浏览器类\IETester v0.5.2"
  63. 2>nul .>"%RootDir%\%TestDir%\360安全浏览器\360se7.0.0.180\360se.exe"
  64. 2>nul .>"%RootDir%\%TestDir%\Google【谷歌浏览器 (Google Chrome) 35.0.1916.114 绿色免安装版+便携版 - 精品绿色便携软件】Chrome_35.0.1916.114_PortableSoft\GoogleChromePortable\App\Google Chrome\chrome.exe"
  65. 2>nul .>"%RootDir%\%TestDir%\OperaNextPortable\launcher.exe"
  66. 2>nul .>"%RootDir%\%TestDir%\pcxFirefox-46.0-zhCN-vc2013-x86-sse2-betterpgo-160430\firefox\firefox.exe"
  67. 2>nul .>"%RootDir%\%TestDir%\SafariPortable\SafariPortable.exe"
  68. 2>nul .>"%RootDir%\%TestDir%\SogouExplorer\SogouExplorer.exe"
  69. 2>nul .>"%RootDir%\%TestDir%\傲游浏览器\111\Bin\Maxthon.exe"
  70. 2>nul .>"%RootDir%\%TestDir%\桌面\1\浏览器类\IETester v0.5.2\IETester.exe"
  71. 2>nul .>"%RootDir%\%TestDir%\桌面\1\浏览器类\LisectIE6.exe"
  72. 2>nul .>"%RootDir%\%TestDir%\桌面\1\浏览器类\世界之窗深度单文件版.exe"
  73. goto :eof
  74. :::::::::::::::::::::::::::::::::::::::::::
复制代码
1. 纯bat代码,没有什么技术含量,但可以解决附件中两处参数自定义的问题;放到任何路径下,运行测试后,生成附件“Side Bar.sublime-menu”的内容。

2. 实际使用时,去掉三处测试命令;假如自定义的浏览器目录为“E:\新建文件夹\浏览器\",把此批处理放到“E:\新建文件夹\”下运行即可。

3. 上面这么长的内容,实际只有标记【%Core%】的四处是核心,其余的都不怎么关联主题。

TOP

回复 9# CommandBatCmd

感谢,这次是可以输出了
但经过测试又有两个问题出现

1.编码问题,默认ANSI,导致编辑器打开乱码,需要设置UTF-8编码才行
2.代码输出有些错误,这是输入的错误图

这是示范简单设置图


这是我目前设置全部浏览器设置图,可能有些多,打算之后把统一整理到【浏览器】文件夹下。



我把目前写好的完整浏览器文件发一下吧,在附件里
sublime编辑器也发一下,也方便你可以用来测试
http://pan.lanzou.com/x/720393

这是从sublime编辑器查看【Side Bar.sublime-menu】设置文件方法

TOP

回复 10# 867258173

以下代码本质没改变,只是稍稍修改了原来的代码。
  1. @echo off&Title 生成Side Bar.sublime-menu的内容&setlocal EnableExtensions
  2. if not exist ".\Data\Packages\User\SideBarEnhancements\Open With" md ".\Data\Packages\User\SideBarEnhancements\Open With"
  3. SET "FilePath=.\Data\Packages\User\SideBarEnhancements\Open With\Side Bar.sublime-menu"
  4. if exist "%FilePath%" if not exist "%FilePath%.bak" copy /y "%FilePath%" "%FilePath%.bak" >nul
  5. .>"%FilePath%" 2>nul&call :head
  6. SET "Program=chrome.exe firefox.exe launcher.exe SafariPortable.exe Maxthon.exe TheWorld.exe 360se.exe 360chrome.exe baidubrowser.exe QQBrowser.exe SogouExplorer.exe LisectIE6.exe IETester.exe navigator.exe"
  7. FOR %%I IN (%Program%) DO for /f "delims=" %%J in ('DIR /S /B /A:-D "%%~I" 2^>nul') do if /I "%%~nxJ"=="%%~I" (set "ExePath=%%~J"&call set "application=%%ExePath:\=/%%"&SET "caption=%%~I"&call :Build)
  8. call :end
  9. (iconv.exe --help >NUL 2>nul)&&(for /f "usebackq" %%I in (`SET /P^="测试"^<NUL^|iconv.exe -f GB2312 -t java`) do if "%%I"=="\u6d4b\u8bd5" ((iconv.exe -f GBK -t UTF-8 "%FilePath%" > "%FilePath%.tmp")&(type "%FilePath%.tmp">"%FilePath%")&(del /f/q "%FilePath%.tmp")))
  10. notepad "%FilePath%"&Endlocal&exit
  11. :Build
  12. set /p=        // This is [%caption%]<nul>>"%FilePath%"&echo,>>"%FilePath%"
  13. set /p"=            {"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  14. set /p=                "caption": "%caption%",<nul>>"%FilePath%"&echo,>>"%FilePath%"
  15. set /p"=                "id": "side-bar-files-open-with-seamonkey","<nul>>"%FilePath%"&echo,>>"%FilePath%"&echo,>>"%FilePath%"
  16. set /p"=                "command": "side_bar_files_open_with","<nul>>"%FilePath%"&echo,>>"%FilePath%"
  17. set /p"=                "args": {"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  18. set /p"=                            "paths": [],"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  19. set /p=                            "application": "%application%", // WINNT<nul>>"%FilePath%"&echo,>>"%FilePath%"
  20. set /p"=                            "extensions":"", //open all even folders"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  21. set /p"=                            "args":[]"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  22. set /p"=                        },"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  23. set /p"=                "open_automatically" : false // will close the view/tab and launch the application"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  24. set /p"=            },"<nul>>"%FilePath%"&echo,>>"%FilePath%"&echo,>>"%FilePath%"&echo,>>"%FilePath%"
  25. goto :eof
  26. :end
  27. set /p"=            {"caption":"-"}"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  28. set /p"=        ]"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  29. set /p"=    }"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  30. set /p"=]"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  31. goto :eof
  32. :head
  33. set /p"=["<nul>>"%FilePath%"&echo,>>"%FilePath%"
  34. set /p"=    {"id": "side-bar-files-open-with","<nul>>"%FilePath%"&echo,>>"%FilePath%"
  35. set /p"=        "children":"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  36. set /p"=        ["<nul>>"%FilePath%"&echo,>>"%FilePath%"&echo,>>"%FilePath%"
  37. set /p"=        //application 1"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  38. set /p"=            {"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  39. set /p"=                "caption": "Photoshop","<nul>>"%FilePath%"&echo,>>"%FilePath%"
  40. set /p"=                "id": "side-bar-files-open-with-photoshop","<nul>>"%FilePath%"&echo,>>"%FilePath%"&echo,>>"%FilePath%"
  41. set /p"=                "command": "side_bar_files_open_with","<nul>>"%FilePath%"&echo,>>"%FilePath%"
  42. set /p"=                "args": {"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  43. set /p"=                            "paths": [],"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  44. set /p"=                            "application": "Adobe Photoshop CS5.app", // OSX"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  45. set /p"=                            "extensions":"psd^|png^|jpg^|jpeg",  //any file with these extensions"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  46. set /p"=                            "args":[]"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  47. set /p"=                        },"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  48. set /p"=                "open_automatically" : false // will close the view/tab and launch the application"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  49. set /p"=            },"<nul>>"%FilePath%"&echo,>>"%FilePath%"&echo,>>"%FilePath%"
  50. set /p"=        //separator"<nul>>"%FilePath%"&echo,>>"%FilePath%"
  51. set /p"=            {"caption":"-"},"<nul>>"%FilePath%"&echo,>>"%FilePath%"&echo,>>"%FilePath%"&echo,>>"%FilePath%"
  52. goto :eof
  53. :::::::::::::::::::::::::::::::::::::::::::
复制代码
说明:
1. 生成的编码为ANSI,全英文路径文件名直接支持UTF-8环境;
2. 生成的换行方式为CR+LF(Windows),要使用LF(Unix),修改:sublime编辑器》查看》行尾》Unix;
3. 生成的路径分隔符为”/“,要使用“\\”,修改程序中的 "application=%%ExePath:\=/%%" 为 "application=%%ExePath:\=\\%%";
4. 已定义14个浏览器,可以根据需要手动直接修改程序中“SET Program=”后的赋值;
5. 本程序放到目录“Data”的同级运行。

手动更改ANSI编码为UTF-8编码:
sublime编辑器》打开文件》Side Bar.sublime-menu;
               文件》设置文件编码》UTF-8;
               文件》保存编码》UTF-8;
               标签页》Side Bar.sublime-menu》关闭;
               文件》打开最近的文件》Side Bar.sublime-menu。
每次这样很麻烦!把iconv.exe放到本程序一起即可(iconv.exe是知名的iconv库在windows下的命令行编码转换工具,谷歌百度一大把)。

以上是实际使用时的完整代码,在XP上测试通过,你可试试,祝你好运!
:::::::::::::::::::::::::::::::::::::::::::

TOP

  1. @echo off
  2. rem win7及以上系统运行
  3. dir /a-d/b/s *.exe|powershell -c "$t='';[IO.File]::ReadAllText('%~f0', [Text.Encoding]::Default) -match '(?<=pause&exit\r\n)(\[[\s\S]+?\[)(\s+?\{[\s\S]+\})(\s+?\{[\s\S]+?\][\s\S]+?\])'|out-null;$input|%%{$t+=(($matches[2] -replace 'fname',($_.split('\')[-2])) -replace 'fpath',($_ -replace '\\','\\'))+\",`n\"};($matches[1]+$t+$matches[3]) -replace '\r',''|out-file '$result.txt' -encoding utf8"
  4. pause&exit
  5. [
  6.     {"id": "side-bar-files-open-with",
  7.         "children":
  8.         [
  9.            {
  10.               "caption": "fname",
  11.               "id": "side-bar-files-open-with-seamonkey",
  12.               "command": "side_bar_files_open_with",
  13.               "args": {
  14.                           "paths": [],
  15.                           "application": "fpath", // WINNT
  16.                           "extensions":"", //open all even folders
  17.                           "args":[]
  18.                       },
  19.               "open_automatically" : false // will close the view/tab and launch the application
  20.            }
  21.            {"caption":"-"}
  22.         ]
  23.     }
  24. ]
复制代码

TOP

返回列表