BAT批处理让文件夹里的文件单个或多个依次移动到另外一个文件夹
@echo off
@echo off&setlocal enabledelayedexpansion
::设置一次移动多少个文件?
set s=1
::120为多少秒
for /f "delims=" %%a in ('dir /a-d/s/b "E:\上传文件\ceshi\data2\*"') do (
if !n! equ %s% (
set n=0
ping 127.0.0.1 -n "120">nul
)
set /a n+=1
move %%a "E:\上传文件\ceshi\data\"
)
pause
代码很简单,但是很好用。
文章转自:bat批处理教程(www.2wx.com)
本文来自博客园,作者:万象文库,转载请注明原文链接:https://www.2wx.com/