批处理中如果需要暂停一段时间如何写?
如题,比如我需要暂停10秒中后继续执行后续语句。
谢谢先!^_^
------解决方案--------------------可以通过 kit 包里面的sleep.exe
sleep 10
另外一个办法是
ping -n 10 localhost > nul
不过时间不是很精确
------解决方案--------------------pause 10
------解决方案--------------------学习!楼主的想法不错,有点意思!不过我想不到,你这么做的目的是什么?
------解决方案--------------------//你提出的第一个方法,用sleep.exe,我还是不大清楚在那么用,能否说的具体一些呢?谢谢
微软总是把一些实用的小工具放在什么resource kit里面。
Windows Server 2003 Resource Kit Tools可以在这个地址下载,容量12M左右,只有英文版。
http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
其中包括的工具有:
Acctinfo.dll (documented in Readme.htm)
Adlb.exe: Active Directory Load Balancing Tool,AD负载均衡
Admx.msi: ADM File Parser,ADM文件解析
Atmarp.exe: Windows ATM ARP Server Information Tool
Atmlane.exe: Windows ATM LAN Emulation Client Information
Autoexnt.exe: AutoExNT Service
Cdburn.exe: ISO CD-ROM Burner Tool,ISO光盘刻录
Checkrepl.vbs: Check Replication,检查复制
Chklnks.exe: Link Check Wizard,链接检查
Chknic.exe: Network Interface Card Compliance Tool for Network Load Balancing
Cleanspl.exe: Spooler Cleaner,打印池清理
Clearmem.exe: Clear Memory,内存清理
Clusdiag.msi: Cluster Diagnostics and Verification Tool,集群诊断和检验
Clusfileport.dll: Cluster Print File Port
Clusterrecovery.exe: Server Cluster Recovery Utility,集群恢复
Cmdhere.inf: Command Here
Cmgetcer.dll: Connection Manager Certificate Deployment Tool
Compress.exe: Compress Files,压缩文件
Confdisk.exe: Disk Configuration Tool,磁盘配置
Consume.exe: Memory Consumers Tool,内存消耗
Creatfil.exe: Create File,创建文件
Csccmd.exe: Client-Side Caching Command-Line Options
Custreasonedit.exe: Custom Reason Editor (documented in Readme.htm)
Delprof.exe: User Profile Deletion Utility,用户配置删除
Dh.exe: Display Heap
Diskraid.exe: RAID Configuration Tool,RAID配置
Diskuse.exe: User Disk Usage Tool,磁盘使用情况
Dnsdiag.exe: SMTP DNS Diagnostic Tool (documented in Readme.htm) ,SMTP/DNS诊断
Dumpfsmos.cmd: Dump FSMO Roles
Dvdburn.exe: ISO DVD Burner Tool,ISO DVD刻录
Empty.exe: Free Working Set Tool
Eventcombmt.exe: Check Replication
Fcopy.exe: File Copy Utility for Message Queuing,消息队列文件复制
Frsflags.vbs
Getcm.exe: Connection Manager Profile Update,连接管理配置文件更新
Gpmonitor.exe: Group Policy Monitor,组策略察看
Gpotool.exe: Group Policy Objects,组策略对象
Hlscan.exe: Hard Link Display Tool
Ifilttst.exe: IFilter Test Suite
Ifmember.exe: User Membership Tool
Inetesc.adm: Internet Explorer Enhanced Security Configuration
Iniman.exe: Initialization Files Manipulation Tool
Instcm.exe: Install Connection Manager Profile
Instsrv.exe: Service Installer,服务安装
Intfiltr.exe: Interrupt Affinity Tool
Kerbtray.exe: Kerberos Tray
Kernrate.exe: Kernel Profiling Tool
Klist.exe: Kerberos List
Krt.exe: Certification Authority Key Recovery
Lbridge.cmd: L-Bridge
Linkd.exe
Linkspeed.exe: Link Speed,连接速度
List.exe: List Text File Tool,察看文本文件
Lockoutstatus.exe: Account Lockout Status (documented in Readme.htm)