Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 12th, 2004, 03:08 PM
Authorized User
 
Join Date: Aug 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exec a .bat file in PHP on XP

I have been attempting to use the exec in a PHP script as follows

exec("c:\program files\utils\some.bat");

without any success.

The batch file runs a macro applications which carries out a series of tasks before exiting and returning control to the batch file and then hopefully to the PHP script.

A search of this and other sites has not provided a working solution. Any help most appreciated
 
Old October 12th, 2004, 03:20 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Try using DOS-style short file names:

exec("c:\progra~1\utils\some.bat");

-Snib <><
Try new FreshView 0.2!
There are only two stupid questions: the one you don't ask, and the one you ask more than once ;)
 
Old October 12th, 2004, 03:27 PM
Authorized User
 
Join Date: Aug 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes tried that thanks Snib - without success







Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a .bat file with CR and linefeed rjonk XSLT 1 November 29th, 2006 01:38 PM
bat file doesn't work maroun BOOK: Beginning Cryptography with Java 1 October 25th, 2005 04:59 PM
Problem with reading BAT file rhysduk VB How-To 0 January 12th, 2005 09:53 AM
Writing to a .BAT file using VB6 rhysduk VB How-To 17 January 7th, 2005 09:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.