Web Hosting, Design, & Coding forum


Batch script to launch batch xml files from folder

by sinki111 / June 21, 2013 2:00 AM PDT

I have a req where we have set of batch xml files in C:\Today\set folder and I need to execute these xml files one by one automatically using batch script and if these files execute successfuly goes to success.log file if they are failed then will go to error.log file and scheduleBatch.cmd is inbuit utility file which executes these xml files.Please help me out how to design the code with this req.I really appreciate your help and Thanks in advance

set userid=joe
set pwd=jackson
SET "xml_dir=c:\today\set"
SET "hyp_server="
For %%z in ("%xml_dir%\*.xml") do (
call schedulebatch "%%z" %userid% %pwd% %hyp_server%
if errorlevel 1 >>"C:\Today\xml-error.log" echo "%%z" failed
if not erorlevel 0 >>"C:\Today\xml-pass.log" echo "%%z" succeeded

Answer This Ask For Clarification
Discussion is locked
You are posting a reply to: Batch script to launch batch xml files from folder
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Batch script to launch batch xml files from folder
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Popular Forums
Computer Help 47,885 discussions
Computer Newbies 10,322 discussions
iPhones, iPods, & iPads 3,188 discussions
Security 30,333 discussions
TVs & Home Theaters 20,177 discussions
HDTV Picture Setting 1,932 discussions
Phones 15,713 discussions
Windows 7 6,210 discussions
Networking & Wireless 14,510 discussions

Big stars on small screens

Smosh tells CNET what it took to make it big online

Internet sensations Ian Hecox and Anthony Padilla discuss how YouTube has changed and why among all their goals, "real TV" isn't an ambition.