Solved

Script or batch to copy XML on loop

Posted on 2014-11-24
2
387 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

627 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