China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-04 01:16
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Question: How to copy files continuously without interruption View 744 Replies 8
Original Poster Posted 2007-04-05 05:59 ·  中国 四川 成都 电信
新手上路
Credits 8
Posts 3
Joined 2007-04-05 05:25
19-year member
UID 84008
Gender Male
Status Offline
Experts: how can I copy a.txt on drive D to drive Z once every minute, with the generated files named a1.txt, a2.txt, a3.txt ........ Can this be done with a batch file? How do I do it, thanks!!
Floor 2 Posted 2007-04-05 06:41 ·  中国 浙江 杭州 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
dim fso
set fso=Createobject("scripting.FileSystemObject")
for num=1 to 10
fso.Copyfile "d:\a.txt","z:\a"+Cstr(num)+".txt"
wscript.sleep 3000
next
set fso=nothing

This copies once every 3 seconds.
Only copies 10 times.
Floor 3 Posted 2007-04-05 10:06 ·  捷克
初级用户
Credits 53
Posts 27
Joined 2005-07-18 20:40
21-year member
UID 40849
Status Offline
Reply #2, are you sure your command doesn't need support from an external program?
Floor 4 Posted 2007-04-05 10:46 ·  中国 浙江 杭州 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
No need. Just try it and you'll know, right??
Floor 5 Posted 2007-04-05 13:37 ·  中国 安徽 蚌埠 电信
中级用户
★★
Credits 292
Posts 137
Joined 2007-04-03 01:59
19-year member
UID 83758
Gender Male
Status Offline
Reply #2, you're really impressive. This section is asking about batch files.
Isn't what you posted ASP?
Floor 6 Posted 2007-04-05 21:32 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Originally posted by bw070 at 2007-4-5 00:37:
Reply #2, you're really impressive. This section is asking about batch files.
Isn't what you posted ASP?


This is the "DOS Batch Files & Scripting Technology" section, any script can be discussed here.

That's a VBS script..
Floor 7 Posted 2007-04-05 22:34 ·  中国 四川 成都 电信
新手上路
Credits 8
Posts 3
Joined 2007-04-05 05:25
19-year member
UID 84008
Gender Male
Status Offline
Can this be done with a simple *.bat batch file written in Notepad?
Floor 8 Posted 2007-04-05 23:30 ·  中国 广东 广州 海珠区 电信
银牌会员
★★★
Credits 1,206
Posts 517
Joined 2007-03-25 01:18
19-year member
UID 82819
Gender Male
Status Offline
Yes, but can I ask what you want to do with it?
知,不觉多。不知,乃求知
Floor 9 Posted 2007-04-07 02:16 ·  中国 四川 成都 电信
新手上路
Credits 8
Posts 3
Joined 2007-04-05 05:25
19-year member
UID 84008
Gender Male
Status Offline
My IP storage often drops the connection, so I want to keep copying files into it continuously, to see whether there's any pattern to when it drops.
Forum Jump: