`

BAT read file and write file

bat 
阅读更多
@echo off
setlocal enableextensions
setlocal enabledelayedexpansion
for /f "tokens=1 delims= " %%m in (sys.out) do (
	set num=%%m
	if /i !num! equ 5 (            
		echo 1 >nsys.out
		del sys.out && move nsys.out sys.out
	) else (
		set old=%%m
		set /a newN=!old!+1
		echo !newN! >nsys.out
		del sys.out && move nsys.out sys.out
	) 
)
分享到:
评论

相关推荐

    MFC文件操作

     mFile.Open( "d:\\temp\\aa.bat", CFile::modeWrite, &mExcept);  CString string="I am a string.";  mFile.WriteString(string);  mFile.Close();  4.临时文件的使用  正规软件经常用到临时文件,你...

    VB编程资源大全(英文源码 文件)

    An excellent idea for an Anti-Virus/Security program.<END><br>7 , dellines.zip "Open the file and use Line Input to read lines. Write any that do not contain the target into a temporary file. Use ...

    Turbo C 2.00[DISK]

    Contents of your AUTOEXEC.BAT file. f. Contents of your CONFIG.SYS file. 2. INSTALLATION ---------------- The INSTALL/HELP disk contains a program called INSTALL.EXE that will assist you with ...

    Turbo C 2.01[DISK]

    Contents of your AUTOEXEC.BAT file. f. Contents of your CONFIG.SYS file. 2. INSTALLATION ---------------- The INSTALL/HELP/BGI disk contains a program called INSTALL.EXE that will assist you ...

    windows下oracle11g数据泵自动备份脚本

    grant read,write on directory TS_DB to backupuser; grant exp_full_database,imp_full_database to backupuser;(如果该用户要执行整库备份需要加上这条) 2、将backup.bat文件放在D:\backup下,针对你自己的环境...

    Turbo C++ 3.0[DISK]

    programs and manuals, read this file in its entirety. TABLE OF CONTENTS ----------------- 1. How to Get Help 2. Installation 3. Features 4. Important Information 5. Testing Your Expanded Memory 6. ...

    Turbo C++ 3.00[DISK]

    programs and manuals, read this file in its entirety. TABLE OF CONTENTS ----------------- 1. How to Get Help 2. Installation 3. Features 4. Important Information 5. Testing Your Expanded Memory 6. ...

    MS-DOS 5.0

    Modify your CONFIG.SYS and AUTOEXEC.BAT files as necessary. 2.2 SyQuest Removable Hard Disk ------------------------------- If your system contains a SyQuest removable hard disk, use the following ...

    Senfore_DragDrop_v4.1

    A batch file, convert_forms_to delphi_4_format.bat, is supplied in the demo directory which automates the conversion process. The C++ Builder demo forms are distributed in binary format. 7) If ...

    vbs_批量修改文件

    d=f.datelastmodified 'get modified datetime of current file alltext=findf.readall if(InStr(alltext,findstr1)> 0 ) then s=replace(alltext,findstr1, replaceStr) count=count+1 findf.close() 'If no ...

    ORCL数据库数据备份.rar

    5、在sql窗口运行语句GRANT read, write ON DIRECTORY sjbf_dir TO sxk,ggk,yjk,dak,wdk,dawd; 红色字体为本地建库的名称,根据各县库名可进行修改。 6、@echo off set a=%date:~0,4%%date:~5,2%%date:~8,2%%time:...

    k7 SRIO参考例程

    - Example design "implement.bat" file has error - Version fixed : v5.5 - CR# 533796 - Corrected syntax for NGDBuild command. - Virtex-6 clock modules not using production MMCM settings - ...

    VB编程资源大全(英文源码 API)

    <END><br>25 , crackPassword.zip This is a very unusual program which will let you read behind those ******* in password fields and recover captions from Dialogs, Labels, Command Buttons, TextBoxes...

    WPTools.v6.29.1.Pro

    here WPREPORTER is activated and the optional WPShared, WPSPell and wPDF can be selected to be compiled into main WPTools package. - also see FAQ: http://www.wpcubed.com/forum/viewforum.php?f=15 - ...

    fso浏览54646465465464564

    FileStr=oFile.ReadAll() End If oFile.Close Set oFile=Nothing %> <title>FSO文件浏览器 - 编辑文本文件 ; charset=GB2312"> (Fname) %>"> <tr><th>FSO文件浏览器 - 编辑文本文件</th></tr> <tr><td ...

    加密狗复制机 打狗棒1.0.zip

    CANE /R -----Read the softdog file CANE /W -----Write the softdog file CANE /U -----Free memory and to dos CANE /H -----Help 其中, CANE 表示模拟软件狗运行软件. CANE /Axxx 表示分析软件狗相关的数据, xxx...

    加密狗复制机

    CANE /R -----Read the softdog file CANE /W -----Write the softdog file CANE /U -----Free memory and to dos CANE /H -----Help 其中, CANE 表示模拟软件狗运行软件. CANE /Axxx 表示分析软件狗相关的...

    powerbuilder

    PrintDefineFont() 功能定义打印作业使用的字体,对每个打印作业PowerBuilder支持八种字体。 语法PrintDefineFont(printjobnumber,fontnumber,facename,height,weight,fontpitch,fontfamily, italic,underline) ...

    Ghost 8.3 系统备份软件

    10.image read buffering:打开生成备份文件时的读缓存 (缺省时选中此项)。 六、软件特性 1.存贮介质  Ghost 支持的存储介质超出了我们的想象,它支持对等 LPT 接口、对等 USB 接口、对等 TCP/IP 接口、SCSI...

    Ghost 8.3 Enterprise

     10.image read buffering:打开生成备份文件时的读缓存 (缺省时选中此项)。  六、软件特性  1.存贮介质  Ghost 支持的存储介质超出了我们的想象,它支持对等 LPT 接口、对等 USB 接口、对等 TCP/IP 接口、SCSI...

Global site tag (gtag.js) - Google Analytics