Solved

Script or batch to copy XML on loop

Posted on 2014-11-24
2
369 Views
Last Modified: 2014-11-24
I need to monitor a particular XML file on a Windows machine and copy it to a location every 10 seconds.  Right now, I use xcopy on a scheduled tasks, but that can only run once a minute.  I really need to copy the file every 10 seconds.  So I need a script or batch to copy the file, pause 10 secs, then run again, in a loop, unless there is another option.
0
Comment
Question by:murryc
2 Comments
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 40462457
Just use a batch that runs in an endless loop and waits 10 seconds between copies; you can use a scheduled task to run it at system startup, or start it once manually:
@echo off
setlocal
:Loop
echo [%Date%][%Time%]Copying ...
xcopy.exe ...
ping.exe -n 11 localhost >NUL
goto Loop

Open in new window

0
 

Author Comment

by:murryc
ID: 40462495
Perfect!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now