We are copy some files with a batch on a win2k3 server, but some files can't
be copied over becuase they are in use for about 3 minutes. When it is not
in use it can be copied over. So I have created a batch that looks like
this:
copy /y c:\folder1\file1.avi c:\folder2\file1.avi
copy /y c:\folder1\file2.avi c:\folder2\file2.avi
sleep 60
copy /y c:\folder1\file1.avi c:\folder2\file1.avi
copy /y c:\folder1\file2.avi c:\folder2\file2.avi
sleep 60
copy /y c:\folder1\file1.avi c:\folder2\file1.avi
copy /y c:\folder1\file2.avi c:\folder2\file2.avi
sleep 60
copy /y c:\folder1\file1.avi c:\folder2\file1.avi
copy /y c:\folder1\file2.avi c:\folder2\file2.avi
sleep 60
Sleep is a program for the resket that cause the program to pause for 60
seconds. There are more than two files but I figured this would be enough
for the excample. Since each file is 3 minutes long I know the file gets
over written within the 4 atemps. I know DOS has a FOR loop but I read
though the help and could not fivure it out. I know this is proably simple
but I am just not getting it.
Thanks,
Jon
Bookmarks