交流


交流趋使世界文明进步。(请使用谷歌浏览器/Please use CHROME browser)
https://twitter.com/nankezhou
各位作者原创之文章已经注明各自之作者,均各自获得其著作权与版权保护。

Translate

著作权和版权声明

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution 4.0 International License. Chinese (CC BY 4.0) .

2019年的春节时间是下月5日 Today Developer Calendar

2018年2月1日 星期四

DIR+FOR完美解决文件寻找、定位、读写、编辑

准备文件调用:

注释:temp是For准备调用的文件,也是do要执行的文件。

dir  "特定名称的特定类型文件.xml"  /s /b 特定名称的特定类型文件.xml /B> temp1.txt



dir  根驱动器:\驱动器路径\万能目录符号* "/*.XML" /s /b *.xml /B> temp2.txt


dir  根驱动器:\驱动器路径\万能目录符号* "\*.XML" /s /b \*.xml /B> temp3.txt




For部分:

for /r  usebackq %%I


IN部分

in  (`findstr /V  根驱动器:\驱动器路径\万能目录符号*\调用文件名称.TXT;特定名称的特定类型文件.xml`)

do命令:

do (start 编辑器根目录:"\program files\编辑器路径\编辑器.exe" -m -t .xml 根驱动器:\驱动器路径\万能目录符号*\特定名称的特定类型文件.xml,--type .xml --file "特定名称的特定类型文件.xml" "%%~i" )
)
echo.
pause


---------------------------------------------------------------------------------------
dir 根驱动器:\驱动器路径\万能目录符号*.*.xml^ AndroidManifest.xml /B /S> temp.txt
                                                     
                                                           *.*.xml^

dir 根驱动器:\驱动器路径\万能目录符号*.*. 特定类型文件^ 特定名称文件 /B /S>temp.txt
-----------------------------------------------------------------------------------------

Command line options
-cCreate new instance.
-cursor line:columnLocate cursor at "line" and "column".
-d directoryStartup directory.
-eLoad a file into an existing instance of EditPlus.
-i directoryINI file directory.
-mRun minimized.
-nCreates a new document.
-pPrints a file.
-pi project_iniSpecifies different project configuration file instead of project_u.ini.
-pr projectSelects a project.
-rOpens a file as read-only.
-s directorySyntax directory.
-sel begin:endSelects text from "begin" position to "end" position.
-t FileTypeSet the file type. "FileType" must be one of the descriptions of file types on Settings & Syntax page of the Preferences dialog box.
-uDo not add the file name to the Recent Files list.
-wDo not load saved workspace.
-wd directoryDirectory to save the workspace.

DDE commands
[activate]Activates EditPlus.
[cursor("line:column")]Locate cursor at "line" and "column".
[open("file")]Opens a file.
[open_nomru("file")]Opens a file without adding the file name to the Recent Files list.
[open_read("file")]Opens a file as read-only.
[print("file")]Prints a file.
[type("FileType")]Sets the file type. See "-t" command line option.
[sel("begin:end")]Selects text from "begin" position to "end" position. See "-sel" command line option.

DDE Service: editplus.exe
DDE Topic: system

No spaces allowed in DDE commands.



DIR+FOR完美解决文件寻找、定位、读写、编辑
http://gotovpn.blogspot.com/2018/02/dirfor.html

十大神器:https://www.zhihu.com/question/59227720


沒有留言:

張貼留言