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

[文件操作] InIFile - 您的".ini"文件幸福管家

INIfile.exe, ver. 1.6 (c) 2006-2009, Horst Schaeffer
Syntax:
   IniFile.exe IniFilePath [section] parameters
Parameters:     Function:
   item=string  assign
   item=        remove item
   item==       clear item
   item         read assignment *)
   /remove      remove section
   (none)       read all assignments of section *)
                *) sends SET statement(s) to STDOUT

IniFile.exe    .ini文件管理者
这个E帮助很简单吧!
如果你要自己做程序,要读取配置或字符创,用它就可以

  INIFile.exe 版本:1.6
Usage:INIFile.exe IniFilePath [section] parameters
IniFilePath  -  ini文件路径,注意路径双引号的处理
[section]  -  ini内标签,注意"["和"]"
...诶呀,发现我文盲了,上E文了

  1. INIFILE - 32 bit tool, Ver 1.6 (c) 2006-2009, Horst Schaeffer
  2. -------------------------------------------------------------
  3. This tool handles Windows type INI files with section names in square brackets,
  4. and assignments of the form: item=string (case ignored for section and item names).
  5. The INI file must exist!
  6. This program uses the functions supplied by the Microsoft Windows API.
  7. ++++ Change or add an assignment
  8. Syntax:  INIFILE inifileName [section] item=string
  9. Example: INIFILE c:\some\where\program.ini [Profile] Name=John
  10.     The string is taken up to the end of the line.
  11.     Optionally, the (entire!) assignment may be enclosed in (double) quote marks
  12.     (in case there are redirection symbols in it).
  13.     In any case the item name as well as the string will be taken without leading
  14.     and trailing spaces.
  15.     Example:  INIFILE c:\some\where\program.ini [Profile] "Name = John"
  16.     If the item is not found, a new line will be added.
  17.     If the section is not found it will be generated.
  18. ++++ Remove assignment
  19. To remove an item: omit the string (the equal sign is mandatory)
  20. Syntax:  INIFILE inifileName [section] item=
  21. Example: INIFILE c:\some\where\program.ini [Profile] Name=
  22.     The complete item (not just the assigned string) is removed.
  23.     If there are no items left, the section will NOT be removed.
  24.     No error will be reported (Errorlevel), if the item does not exist.
  25. ++++ Clear assignment
  26. If you want to produce an empty assignment without removing it,
  27. use two equal signs.
  28. Syntax:  INIFILE inifileName [section] item==
  29. ++++ Remove entire section
  30. To remove a section the security option /REMOVE (case ignored)
  31. is required. No error reported, if the section does not exist.
  32. Syntax:  INIFILE inifileName [section] /remove
  33. ++++ Get an assignment
  34. Syntax:  INIFILE inifileName [section] item
  35.     (Note that an additional equal sign would remove the item!!!)
  36.     The program will generate a SET statement, and send it to STDOUT.
  37.     If you want to produce an environmental variable, redirect the output
  38.     to a temporary batch file, and execute it (see also: GetOutput.txt)
  39.     Note: Character set is ANSI (Windows), not OEM (DOS).
  40.     Example:
  41.          INIfile c:\some\where\program.ini [Profile] Name > temp.bat
  42.          call temp.bat
  43.     If the assignment could not be found for any reason,
  44.     the SET statement will be empty (set var=), which clears the variable.
  45.     Note: This method cannot be used when equal signs or redirection
  46.     symbols are expected in the assigned string.
  47. ++++ Get all assignments of a section
  48. Syntax:  INIFILE inifileName [section]
  49.    
  50.     SET statements will be generated for all items in the section.
  51. ++++ Errorlevels
  52.     Errorlevel > 0 indicates an error (message to STDERR)
  53.     0    done
  54.     1    INI file does not exist  
  55.     2    Section name in square brackets was not given
  56.     255  No INI file specified or help requested (/?)
  57. The INI file operations are done through the Windows API which handles spaces,
  58. upper/lower case etc.. There may be a size limit or a problem with long file
  59. names in older Windows versions. Please test.
  60. Note: In case you have used my old DOS program "INIFILE.COM" make sure that this new
  61. version is found through your PATH assignment (or use the command "inifile.exe").  
  62. ++++ History
  63. version 1.6, 27 May 2009: Compiled with PB 4.30
  64. version 1.5, 29 Sep 2006: Equal signs allowed in assigned string (though not recommended)
  65. version 1.4, 02 Aug 2006: Added function: clear assignment without removing
  66. version 1.1, 12 Feb 2006: Added: read all items of section
  67. version 1.0, 05 Feb 2006  
  68. ++++ Disclaimer, Copyright
  69.     This program is distributed as "freeware", copyright reserved by the
  70.     author. There are no warranties of any kind, nor any liability by
  71.     the author. Users accept full responsibility for the use they make
  72.     of the software and for any damage caused thereby.
  73.     Source available: http://www.horstmuc.de/source/inifile16.zip
  74.     Contact the author:
  75.     mailto:horst.schaeffer@gmx.net
  76.     http://www.horstmuc.de/
  77.    
  78. *** 27 May 2009
复制代码



百度翻译:
  1. i nifile - 32位的工具,1.6版(三)-,霍斯特·谢弗-------------------------------------------------------------这个工具处理窗口式文件与节的名称在方括号,和任务的形式:项目=字符串(案例忽视部分和项目的名称)。该文件必须存在!该程序使用功能所提供的微软视窗程式设计。+ + + +更改或添加一个赋值语法:i nifile inifilename [部分]项目=字符串例如:i nifile:一些\哪里\ program.ini [简介]名字=约翰字符串是采取至行末。或者,在(整个!)转让可能被封闭在引号(双)(如果有重定向符号在)。在任何情况下该项的名称以及字符串将采取无领导和尾随空格。例如:i nifile:一些\哪里\ program.ini [简介]”的名称=约翰”如果该项目没有发现,新生产线将被添加。如果不是发现它会产生。+ + + +删除任务删除一个项目:省略字符串(等号是强制性的)语法:i nifile inifilename [部分]项目=例如:i nifile:一些\哪里\ program.ini [简介]名字完整的项目(不只是指定字符串)被删除。如果没有剩下的部分,将不会被删除。没有错误将报告(e rrorlevel),如果该项目不存在。+ + + +明确任务如果你想产生一个空的任务而不删除它,用等号。语法:i nifile inifilename [部分]项目= =+ + + +删除整个第去掉一段安全选项/删除(案例忽略)是必要的。没有错误报告,如果部分不存在。语法:i nifile inifilename [部分] /删除+ + + +得到分配语法:i nifile inifilename [部分]项目(注意,另外一个等号将删除该项目!!!)该程序将生成一个报表,并将其发送到标准输出。如果你想要产生一个环境变量,重定向输出到一个临时文件,并执行它(参见:getoutput的。)注:字符集标准(窗口),没有贴牌(司)。示例:i nifile:一些\哪里\ program.ini [简介] temp.bat名称>temp.bat打电话如果任务无法找到任何理由,设置声明将空(集无功=),从而清除变量。注意:这个方法不能用来当等号或重定向符号预计在指定字符串。+ + + +得到所有任务的一部分语法:i nifile inifilename [部分]语句会生成所有项目的部分。+ + + + errorlevels批处理命令> 0表示错误(消息到标准错误)0行1个文件不存在2段在方括号中是没有名字255号文件规定或要求(/?)该文件操作是通过应用程序的处理空间,上下箱等。有可能是一个大小限制或问题与长文件在旧版本的名字。请测试。注意:如果你使用了我的旧程序的“i nifile。”确保这一新的版本是发现通过路径分配(或使用命令“i nifile文件。”)。+ + + +历史1.6版本,可以编译27 2009:铅4.30版本1.5,29月2006日:等号允许在指定字符串(不推荐)版本1.4,02月2006日:添加功能:明确任务删除版本1.1,12月2006日:补充:阅读所有项目的部分版本1,05月2006日+ + + +的版权声明,本程序是“免费”,保留版权的作者。也没有任何担保,也没有任何的责任作者。用户承担全部责任,他们使用该软件为任何由此造成的损失。来源:http://www.horstmuc.de/source/inifile16.zip联系作者:邮寄地址:horst.schaeffer@gmx.nethttp://www.horstmuc.de/* * * 27 2009
复制代码


...:L 各位,我才高一,别折磨我了!

百度翻译有误,这里不做更改

那位E好的,帮帮忙改一下!

不多说,上文件
http://bcn.bathome.net/s/tool/index.html?key=inifile

这个"[code]"怎么会没有代码呢?

表情呢?

TOP

现在有code了
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

恩恩,谢谢管理员啊

TOP

返回列表