1. RE: Path pitfalls....

> When it is run, the current directory is not that the same as where the 
> file is stored, because it's being run by an Access macro.
> How can I change the current directory?
> 
> I'm using win2k, but mapping network drives is not an option, because it 
> needs to be run by other people.
> 
> It won't work with absolute addressing either, because two of it's calls 
> are to PHP scripts, and they don't like being addressed that way; it 
> comes up with a CMD error. 
> The script used to work when only using relative addressing ( \bin,  ..\ 
> ,etc), and running via a double click... not possible any more.
> 
> Any help VERY appreciated.
> =======================
> Patrick Barnes
> Information Systems Group
> 201 Elizabeth St, Sydney
> Patrick.Barnes at tg.nsw.gov.au
> Ext: 91-3583
> Ph:(02) 9284-3583
> Mob: 0410 751 044

This might work for you.  At least I think it should.  I have not tested 
this personally.  In kernel32 dll is an API named SetCurrentDirectory.  
It takes a pointer to a path and changes the current directory for the 
current process.

Declaration:
BOOL SetCurrentDirectory(
LPCTSTR lpPathName // address of name of new current directory 
);

include Win32Lib.ew

==========
constant
SetCurrentDirectory = registerw32Procedure(
    kernel32, "SetCurrentDirectoryA", {C_POINTER} )

atom str
str = allocate_string("\\\\fp-ho1-pr\\HO_share\\Tier 3 Database\\bin\\")
w32Proc( SetCurrentDirectory, {str} )
free( str )
==========

Don

new topic     » topic index » view message » categorize

2. RE: Path pitfalls....

Hmmm, I tried that.

It doesn't want to run system() after I've changed the directory.

On this line:
system("php.exe Cat.php > export.html", 0)

It puts out to screen this error message:
CMD.EXE was started with '\\fp-ho1-pr\HO_Share\Tier 3 Database' as the current
directory path. UNC paths are not supported. Defaulting to windows directory.

What's the win32 equivalent for system?

I tried using 
shellExecute("open", "bin\\php.exe bin\\Cat.php > bin\\export.html",
SW_SHOWNORMAL)

but apparently it won't work without a winMain call. I don't want one, this is a
script, not an application.

=======================
Patrick Barnes
Information Systems Group
201 Elizabeth St, Sydney
Patrick.Barnes at tg.nsw.gov.au
Ext: 91-3583
Ph:(02) 9284-3583
Mob: 0410 751 044



-----Original Message-----
From: Don Phillips [mailto:EuNexus at yahoo.com]
Sent: Monday, 25 November 2002 16:42
To: EUforum
Subject: RE: Path pitfalls....



> When it is run, the current directory is not that the same as where the 
> file is stored, because it's being run by an Access macro.
> How can I change the current directory?
> 
> I'm using win2k, but mapping network drives is not an option, because it 
> needs to be run by other people.
> 
> It won't work with absolute addressing either, because two of it's calls 
> are to PHP scripts, and they don't like being addressed that way; it 
> comes up with a CMD error. 
> The script used to work when only using relative addressing ( \bin,  ..\ 
> ,etc), and running via a double click... not possible any more.
> 
> Any help VERY appreciated.
> =======================
> Patrick Barnes
> Information Systems Group
> 201 Elizabeth St, Sydney
> Patrick.Barnes at tg.nsw.gov.au
> Ext: 91-3583
> Ph:(02) 9284-3583
> Mob: 0410 751 044

This might work for you.  At least I think it should.  I have not tested 
this personally.  In kernel32 dll is an API named SetCurrentDirectory.  
It takes a pointer to a path and changes the current directory for the 
current process.

Declaration:
BOOL SetCurrentDirectory(
LPCTSTR lpPathName // address of name of new current directory 
);

include Win32Lib.ew

==========
constant
SetCurrentDirectory = registerw32Procedure(
    kernel32, "SetCurrentDirectoryA", {C_POINTER} )

atom str
str = allocate_string("\\\\fp-ho1-pr\\HO_share\\Tier 3 Database\\bin\\")
w32Proc( SetCurrentDirectory, {str} )
free( str )
==========

Don





***********************************************************************

"This electronic message and any attachments may contain privileged
and confidential information intended only for the use of the 
addressees named above.  If you are not the intended recipient of 
this email, please delete the message and any attachment and advise
the sender.  You are hereby notified that any use, dissemination, 
distribution, reproduction of this email is prohibited.

If you have received the email in error, please notify TransGrid 
immediately.  Any views expressed in this email are those of the 
individual sender except where the sender expressly and with 
authority states them to be the views of TransGrid.  TransGrid uses
virus scanning software but excludes any liability for viruses
contained in any attachment.

Please note the email address for TransGrid personnel is now
firstname.lastname at transgrid.com.au"

***********************************************************************

new topic     » goto parent     » topic index » view message » categorize

3. RE: Path pitfalls....

Hi Patrick,

Just one "kludge" suggestion ...

How about coping the program (and other files) to a directory on the 
C drive first, then run the program from the C drive, and if need be
copy any result files back to the server?

Copying to the %TEMP% directory should be a good place???

It's along way from perfect, but should work.

Regards,

Ray Smith


Patrick.Barnes at transgrid.com.au wrote:
> Hmmm, I tried that.
> 
> It doesn't want to run system() after I've changed the directory.
> 
> On this line:
> system("php.exe Cat.php > export.html", 0)
> 
> It puts out to screen this error message:
> CMD.EXE was started with '\\fp-ho1-pr\HO_Share\Tier 3 Database' as the 
> current directory path. UNC paths are not supported. Defaulting to 
> windows directory.
> 
> What's the win32 equivalent for system?
> 
> I tried using 
> shellExecute("open", "bin\\php.exe bin\\Cat.php > bin\\export.html", 
> SW_SHOWNORMAL)
> 
> but apparently it won't work without a winMain call. I don't want one, 
> this is a script, not an application.
> 
> =======================
> Patrick Barnes
> Information Systems Group
> 201 Elizabeth St, Sydney
> Patrick.Barnes at tg.nsw.gov.au
> Ext: 91-3583
> Ph:(02) 9284-3583
> Mob: 0410 751 044
> 
> 
> -----Original Message-----
> From: Don Phillips [mailto:EuNexus at yahoo.com]
> Sent: Monday, 25 November 2002 16:42
> To: EUforum
> Subject: RE: Path pitfalls....
> 
> 
> > When it is run, the current directory is not that the same as where the 
> > file is stored, because it's being run by an Access macro.
> > How can I change the current directory?
> > 
> > I'm using win2k, but mapping network drives is not an option, because it 
> > 
> > needs to be run by other people.
> > 
> > It won't work with absolute addressing either, because two of it's calls 
> > 
> > are to PHP scripts, and they don't like being addressed that way; it 
> > comes up with a CMD error. 
> > The script used to work when only using relative addressing ( \bin,  ..\ 
> > 
> > ,etc), and running via a double click... not possible any more.
> > 
> > Any help VERY appreciated.
> > =======================
> > Patrick Barnes
> > Information Systems Group
> > 201 Elizabeth St, Sydney
> > Patrick.Barnes at tg.nsw.gov.au
> > Ext: 91-3583
> > Ph:(02) 9284-3583
> > Mob: 0410 751 044
> 
> This might work for you.  At least I think it should.  I have not tested 
> 
> this personally.  In kernel32 dll is an API named SetCurrentDirectory.  
> It takes a pointer to a path and changes the current directory for the 
> current process.
> 
> Declaration:
> BOOL SetCurrentDirectory(
> LPCTSTR lpPathName // address of name of new current directory 
> );
> 
> include Win32Lib.ew
> 
> ==========
> constant
> SetCurrentDirectory = registerw32Procedure(
>     kernel32, "SetCurrentDirectoryA", {C_POINTER} )
> 
> atom str
> str = allocate_string("\\\\fp-ho1-pr\\HO_share\\Tier 3 Database\\bin\\")
> w32Proc( SetCurrentDirectory, {str} )
> free( str )
> ==========
> 
> Don
> 
> 
> ***********************************************************************
> 
> "This electronic message and any attachments may contain privileged
> and confidential information intended only for the use of the 
<snip>



Ray Smith
http://rays-web.com

new topic     » goto parent     » topic index » view message » categorize

4. RE: Path pitfalls....

Perhaps I should illuminate the purpose for which I use this script.

All files are sitting out on the network.. in the previously mentioned
directory.
There is a macro in an Access database that exports a text file to the same
directory as everything else.

There are two php files that when executed; read in the text file and spit out
html.

My euphoria program is called by the same macro, after it has finished exporting
the text file.

I have to: run both php files, strip off the top 3 lines (the standard php
header), and copy into 2x html and 2x asp files.

Mapping the network drive has solved the problem temporarily, but this database
will have to be used by other people, so it's not a permanent solution.

What's the best way to accomplish that task?
=======================
Patrick Barnes
Information Systems Group
201 Elizabeth St, Sydney
Patrick.Barnes at tg.nsw.gov.au
Ext: 91-3583
Ph:(02) 9284-3583
Mob: 0410 751 044


-----Original Message-----
From: Derek Parnell [mailto:ddparnell at bigpond.com]
Sent: Tuesday, 26 November 2002 09:07
To: EUforum
Subject: Re: Path pitfalls....



Patrick,
I did some quick research and discovered that even though the API docs say 
you need a parent window, you can get by with out one for shellExecute. So 
if you'd like to do a small mod on the win32lib.ew file....

Find the shellExecute routine and change the lines ...

       warnErr("shellExecute requires a WinMain()")
       return 0

to ...
     hWnd = 0

And this should then be able to be used without a Main Window.

As another idea, you might like to get the current directory and prepend it 
to the file name before you try to execute it.


On Tue, 26 Nov 2002 08:36:51 +1100, <Patrick.Barnes at transgrid.com.au> wrote:

>
> Hmmm, I tried that.
>
> It doesn't want to run system() after I've changed the directory.
>
> On this line:
> system("php.exe Cat.php > export.html", 0)
>
> It puts out to screen this error message:
> CMD.EXE was started with '\\fp-ho1-pr\HO_Share\Tier 3 Database' as the 
> current directory path. UNC paths are not supported. Defaulting to 
> windows directory.
>
> What's the win32 equivalent for system?
>
> I tried using shellExecute("open", "bin\\php.exe bin\\Cat.php > 
> bin\\export.html", SW_SHOWNORMAL)
>
> but apparently it won't work without a winMain call. I don't want one, 
> this is a script, not an application.
>
> =======================
> Patrick Barnes
> Information Systems Group
> 201 Elizabeth St, Sydney
> Patrick.Barnes at tg.nsw.gov.au
> Ext: 91-3583
> Ph:(02) 9284-3583
> Mob: 0410 751 044
>
>
> -----Original Message-----
> From: Don Phillips [mailto:EuNexus at yahoo.com]
> Sent: Monday, 25 November 2002 16:42
> To: EUforum
> Subject: RE: Path pitfalls....
>
>
>> When it is run, the current directory is not that the same as where the file 
>> is stored, because it's being run by an Access macro.
>> How can I change the current directory?
>>
>> I'm using win2k, but mapping network drives is not an option, because it
>> needs
>> to be run by other people.
>>
>> It won't work with absolute addressing either, because two of it's calls are 
>> to PHP scripts, and they don't like being addressed that way; it comes 
>> up with a CMD error. The script used to work when only using relative 
>> addressing ( \bin,  ..\ ,etc), and running via a double click... not 
>> possible any more.
>>
>> Any help VERY appreciated.
>> =======================
>> Patrick Barnes
>> Information Systems Group
>> 201 Elizabeth St, Sydney
>> Patrick.Barnes at tg.nsw.gov.au
>> Ext: 91-3583
>> Ph:(02) 9284-3583
>> Mob: 0410 751 044
>
> This might work for you.  At least I think it should.  I have not tested this 
> personally.  In kernel32 dll is an API named SetCurrentDirectory.  It 
> takes a pointer to a path and changes the current directory for the current 
> process.
>
> Declaration:
> BOOL SetCurrentDirectory(
> LPCTSTR lpPathName // address of name of new current directory );
>
> include Win32Lib.ew
>
> ==========
> constant
> SetCurrentDirectory = registerw32Procedure(
> kernel32, "SetCurrentDirectoryA", {C_POINTER} )
>
> atom str
> str = allocate_string("\\\\fp-ho1-pr\\HO_share\\Tier 3 Database\\bin\\")
> w32Proc( SetCurrentDirectory, {str} )
> free( str )
> ==========
>
> Don
>
>
> ***********************************************************************
>
> "This electronic message and any attachments may contain privileged
> and confidential information intended only for the use of the addressees 
> named above.  If you are not the intended recipient of this email, please 
> delete the message and any attachment and advise
> the sender.  You are hereby notified that any use, dissemination,
> distribution,
> reproduction of this email is prohibited.
>
> If you have received the email in error, please notify TransGrid immediately. 
<snip>

>
>


-- 

cheers,
Derek Parnell





***********************************************************************

"This electronic message and any attachments may contain privileged
and confidential information intended only for the use of the 
addressees named above.  If you are not the intended recipient of 
this email, please delete the message and any attachment and advise
the sender.  You are hereby notified that any use, dissemination, 
distribution, reproduction of this email is prohibited.

If you have received the email in error, please notify TransGrid 
immediately.  Any views expressed in this email are those of the 
individual sender except where the sender expressly and with 
authority states them to be the views of TransGrid.  TransGrid uses
virus scanning software but excludes any liability for viruses
contained in any attachment.

Please note the email address for TransGrid personnel is now
firstname.lastname at transgrid.com.au"

***********************************************************************

new topic     » goto parent     » topic index » view message » categorize

5. RE: Path pitfalls....

Damn, and I thought I'd figured it out, too.

I got rid of all my system calls, and used shellExecute, but it didn't quite
work. No doubt I'm making a mistake somewhere.

This is my code for one php file.
-----------------------------------------------------------------
--run the php script Cat, and output the results into export.html
shellExecute("open", "bin\\php.exe bin\\Cat.php > bin\\export1.html",
SW_SHOWNORMAL)

--open export.html as read, and the other two files as write.
s = open("BIN\\export1.html","r")
d1 = open("Tier 3 Apps by Category.html","w")
d2 = open("Tier_3_Apps_by_Category.asp","w")

--strip out the top two lines.
line = gets(s)
line = gets(s)

--Copy the rest across to the destination files
--read a line in.
line = gets(s)
while sequence(line) do --while the source file does not end...
	puts(d1, line) --output that line to d1
	puts(d2, line) --and d2
	line = gets(s) --and get a new line
end while

--close those files
close(s)
close(d1)
close(d2)
-------------------------------------------------------------------
The other half of the program is almost identical.
I thought it was working fine, but it turns out that the shellExecute command
doesn't do anything. What am I doing wrong?
=======================
Patrick Barnes
Information Systems Group
201 Elizabeth St, Sydney
Patrick.Barnes at tg.nsw.gov.au
Ext: 91-3583
Ph:(02) 9284-3583
Mob: 0410 751 044

-----Original Message-----
From: Derek Parnell [mailto:ddparnell at bigpond.com]
Sent: Tuesday, 26 November 2002 09:07
To: EUforum
Subject: Re: Path pitfalls....



Patrick,
I did some quick research and discovered that even though the API docs say 
you need a parent window, you can get by with out one for shellExecute. So 
if you'd like to do a small mod on the win32lib.ew file....

Find the shellExecute routine and change the lines ...

       warnErr("shellExecute requires a WinMain()")
       return 0

to ...
     hWnd = 0

And this should then be able to be used without a Main Window.

As another idea, you might like to get the current directory and prepend it 
to the file name before you try to execute it.


On Tue, 26 Nov 2002 08:36:51 +1100, <Patrick.Barnes at transgrid.com.au> wrote:

>
> Hmmm, I tried that.
>
> It doesn't want to run system() after I've changed the directory.
>
> On this line:
> system("php.exe Cat.php > export.html", 0)
>
> It puts out to screen this error message:
> CMD.EXE was started with '\\fp-ho1-pr\HO_Share\Tier 3 Database' as the 
> current directory path. UNC paths are not supported. Defaulting to 
> windows directory.
>
> What's the win32 equivalent for system?
>
> I tried using shellExecute("open", "bin\\php.exe bin\\Cat.php > 
> bin\\export.html", SW_SHOWNORMAL)
>
> but apparently it won't work without a winMain call. I don't want one, 
> this is a script, not an application.
>
> =======================
> Patrick Barnes
> Information Systems Group
> 201 Elizabeth St, Sydney
> Patrick.Barnes at tg.nsw.gov.au
> Ext: 91-3583
> Ph:(02) 9284-3583
> Mob: 0410 751 044
>
>
> -----Original Message-----
> From: Don Phillips [mailto:EuNexus at yahoo.com]
> Sent: Monday, 25 November 2002 16:42
> To: EUforum
> Subject: RE: Path pitfalls....
>
>
>> When it is run, the current directory is not that the same as where the file 
>> is stored, because it's being run by an Access macro.
>> How can I change the current directory?
>>
>> I'm using win2k, but mapping network drives is not an option, because it
>> needs
>> to be run by other people.
>>
>> It won't work with absolute addressing either, because two of it's calls are 
>> to PHP scripts, and they don't like being addressed that way; it comes 
>> up with a CMD error. The script used to work when only using relative 
>> addressing ( \bin,  ..\ ,etc), and running via a double click... not 
>> possible any more.
>>
>> Any help VERY appreciated.
>> =======================
>> Patrick Barnes
>> Information Systems Group
>> 201 Elizabeth St, Sydney
>> Patrick.Barnes at tg.nsw.gov.au
>> Ext: 91-3583
>> Ph:(02) 9284-3583
>> Mob: 0410 751 044
>
> This might work for you.  At least I think it should.  I have not tested this 
> personally.  In kernel32 dll is an API named SetCurrentDirectory.  It 
> takes a pointer to a path and changes the current directory for the current 
> process.
>
> Declaration:
> BOOL SetCurrentDirectory(
> LPCTSTR lpPathName // address of name of new current directory );
>
> include Win32Lib.ew
>
> ==========
> constant
> SetCurrentDirectory = registerw32Procedure(
> kernel32, "SetCurrentDirectoryA", {C_POINTER} )
>
> atom str
> str = allocate_string("\\\\fp-ho1-pr\\HO_share\\Tier 3 Database\\bin\\")
> w32Proc( SetCurrentDirectory, {str} )
> free( str )
> ==========
>
> Don
>
>
> ***********************************************************************
>
> "This electronic message and any attachments may contain privileged
> and confidential information intended only for the use of the addressees 
> named above.  If you are not the intended recipient of this email, please 
> delete the message and any attachment and advise
> the sender.  You are hereby notified that any use, dissemination,
> distribution,
> reproduction of this email is prohibited.
>
> If you have received the email in error, please notify TransGrid immediately. 
<snip>

>
>


-- 

cheers,
Derek Parnell





***********************************************************************

"This electronic message and any attachments may contain privileged
and confidential information intended only for the use of the 
addressees named above.  If you are not the intended recipient of 
this email, please delete the message and any attachment and advise
the sender.  You are hereby notified that any use, dissemination, 
distribution, reproduction of this email is prohibited.

If you have received the email in error, please notify TransGrid 
immediately.  Any views expressed in this email are those of the 
individual sender except where the sender expressly and with 
authority states them to be the views of TransGrid.  TransGrid uses
virus scanning software but excludes any liability for viruses
contained in any attachment.

Please note the email address for TransGrid personnel is now
firstname.lastname at transgrid.com.au"

***********************************************************************

new topic     » goto parent     » topic index » view message » categorize

6. RE: Path pitfalls....

No dice, it IS the "> bin\\export1.html" that's the problem.

Also, does the program halt until the shellExecute is finished? If it doesn't,
then that is going to cause problems too.

Qs:
---

1. How to redirect stdout in the windows environment?

2. How to make the eu program wait until php.exe is finished?


==============================================
 _______<-------------------\__
/  _____<--------------------__|===
| |_    <-------------------/
\__| Patrick Barnes



-----Original Message-----
From: Derek Parnell [mailto:ddparnell at bigpond.com]
Sent: Tuesday, 26 November 2002 10:51
To: EUforum
Subject: Re: Path pitfalls....



Try using shellExecuteEx instead...

shellExecuteEx( object verb, sequence file, object parms,
                 object defdir, atom style, atom struct)

shellExecute("open", "bin\\php.exe > bin\\export1.html", "bin\\Cat.php", 0, 
SW_SHOWNORMAL, 0)

Or maybe its the stdout redirection causing it.

On Tue, 26 Nov 2002 10:02:54 +1100, <Patrick.Barnes at transgrid.com.au> wrote:

>
> Damn, and I thought I'd figured it out, too.
>
> I got rid of all my system calls, and used shellExecute, but it didn't 
> quite work. No doubt I'm making a mistake somewhere.
>
> This is my code for one php file.
> -----------------------------------------------------------------
> --run the php script Cat, and output the results into export.html
> shellExecute("open", "bin\\php.exe bin\\Cat.php > bin\\export1.html", 
> SW_SHOWNORMAL)
>
> --open export.html as read, and the other two files as write.
> s = open("BIN\\export1.html","r")
> d1 = open("Tier 3 Apps by Category.html","w")
> d2 = open("Tier_3_Apps_by_Category.asp","w")
>
> --strip out the top two lines.
> line = gets(s)
> line = gets(s)
>
> --Copy the rest across to the destination files
> --read a line in.
> line = gets(s)
> while sequence(line) do --while the source file does not end...
> 	puts(d1, line) --output that line to d1
> 	puts(d2, line) --and d2
> 	line = gets(s) --and get a new line
> end while
>
> --close those files
> close(s)
> close(d1)
> close(d2)
> -------------------------------------------------------------------
> The other half of the program is almost identical.
> I thought it was working fine, but it turns out that the shellExecute 
> command doesn't do anything. What am I doing wrong?
> =======================
> Patrick Barnes
> Information Systems Group
> 201 Elizabeth St, Sydney
> Patrick.Barnes at tg.nsw.gov.au
> Ext: 91-3583
> Ph:(02) 9284-3583
> Mob: 0410 751 044
>
> -----Original Message-----
> From: Derek Parnell [mailto:ddparnell at bigpond.com]
> Sent: Tuesday, 26 November 2002 09:07
> To: EUforum
> Subject: Re: Path pitfalls....
>
>
> Patrick,
> I did some quick research and discovered that even though the API docs 
> say you need a parent window, you can get by with out one for 
> shellExecute. So if you'd like to do a small mod on the win32lib.ew 
> file....
>
> Find the shellExecute routine and change the lines ...
>
> warnErr("shellExecute requires a WinMain()")
> return 0
>
> to ...
> hWnd = 0
>
> And this should then be able to be used without a Main Window.
>
> As another idea, you might like to get the current directory and prepend 
> it to the file name before you try to execute it.
>
>
> On Tue, 26 Nov 2002 08:36:51 +1100, <Patrick.Barnes at transgrid.com.au> 
> wrote:
>
>>
>> Hmmm, I tried that.
>>
>> It doesn't want to run system() after I've changed the directory.
>>
>> On this line:
>> system("php.exe Cat.php > export.html", 0)
>>
>> It puts out to screen this error message:
>> CMD.EXE was started with '\\fp-ho1-pr\HO_Share\Tier 3 Database' as the
>> current
>> directory path. UNC paths are not supported. Defaulting to windows 
>> directory.
>>
>> What's the win32 equivalent for system?
>>
>> I tried using shellExecute("open", "bin\\php.exe bin\\Cat.php >
>> bin\\export.html",
>> SW_SHOWNORMAL)
>>
>> but apparently it won't work without a winMain call. I don't want one, this 
>> is a script, not an application.
>>
>> =======================
>> Patrick Barnes
<snip>




-- 

cheers,
Derek Parnell





***********************************************************************

"This electronic message and any attachments may contain privileged
and confidential information intended only for the use of the 
addressees named above.  If you are not the intended recipient of 
this email, please delete the message and any attachment and advise
the sender.  You are hereby notified that any use, dissemination, 
distribution, reproduction of this email is prohibited.

If you have received the email in error, please notify TransGrid 
immediately.  Any views expressed in this email are those of the 
individual sender except where the sender expressly and with 
authority states them to be the views of TransGrid.  TransGrid uses
virus scanning software but excludes any liability for viruses
contained in any attachment.

Please note the email address for TransGrid personnel is now
firstname.lastname at transgrid.com.au"

***********************************************************************

new topic     » goto parent     » topic index » view message » categorize

7. RE: Path pitfalls....

Patrick.Barnes at transgrid.com.au wrote:
> No dice, it IS the "> bin\\export1.html" that's the problem.
> 
> Also, does the program halt until the shellExecute is finished? If it 
> doesn't, then that is going to cause problems too.
> 
> Qs:
> ---
> 
> 1. How to redirect stdout in the windows environment?
> 
> 2. How to make the eu program wait until php.exe is finished?

One way would be to use a batch file instead.

eg. setup a batch file this:
bin\php.exe bin\Cat.php > bin\export1.html
bin\php.exe bin\Cat2.php > bin\export2.html
your_eu_program.exe

and get access to run the batch file instead.

... just an idea

Regards,

Ray Smith
http://rays-web.com

new topic     » goto parent     » topic index » view message » categorize

8. RE: Path pitfalls....

A batch file will not work.

It takes one look at the current directory (\\fp-ho1-pr\hp_ ...etc) and quits.

I'm not forced to do this in a windows environment per se, but the files are
sitting at that network location, and I can't move them. Thus, everything has to
be done there. And I wouldn't even know where to start using DOS protocols.

==============================================
 _______<-------------------\__
/  _____<--------------------__|===
| |_    <-------------------/
\__| Patrick Barnes



-----Original Message-----
From: Ray Smith [mailto:smithr at ix.net.au]
Sent: Tuesday, 26 November 2002 12:06
To: EUforum
Subject: RE: Path pitfalls....




Patrick.Barnes at transgrid.com.au wrote:
> No dice, it IS the "> bin\\export1.html" that's the problem.
> 
> Also, does the program halt until the shellExecute is finished? If it 
> doesn't, then that is going to cause problems too.
> 
> Qs:
> ---
> 
> 1. How to redirect stdout in the windows environment?
> 
> 2. How to make the eu program wait until php.exe is finished?

One way would be to use a batch file instead.

eg. setup a batch file this:
bin\php.exe bin\Cat.php > bin\export1.html
bin\php.exe bin\Cat2.php > bin\export2.html
your_eu_program.exe

and get access to run the batch file instead.

... just an idea

Regards,

Ray Smith
http://rays-web.com





***********************************************************************

"This electronic message and any attachments may contain privileged
and confidential information intended only for the use of the 
addressees named above.  If you are not the intended recipient of 
this email, please delete the message and any attachment and advise
the sender.  You are hereby notified that any use, dissemination, 
distribution, reproduction of this email is prohibited.

If you have received the email in error, please notify TransGrid 
immediately.  Any views expressed in this email are those of the 
individual sender except where the sender expressly and with 
authority states them to be the views of TransGrid.  TransGrid uses
virus scanning software but excludes any liability for viruses
contained in any attachment.

Please note the email address for TransGrid personnel is now
firstname.lastname at transgrid.com.au"

***********************************************************************

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu