Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Trouble running BAT file from P9...?

 
Goto page 1, 2
   Database Help (Home) -> Paradox RSS
Next:  Missing file  
Author Message
Kenneth

External


Since: Feb 12, 2008
Posts: 26



(Msg. 1) Posted: Wed Dec 17, 2008 11:10 am
Post subject: Trouble running BAT file from P9...?
Archived from groups: comp>databases>paradox (more info?)

Howdy,

I run P9 with XP.

I need to run a batch file from Paradox, but can't seem to
get it happy.

The line is:

if not execute("\\K06\\K06 apps\\ten.bat") then errorShow()
endif

but when I run it, I get "error occurred trying to execute
the specified program."

The batch file runs properly if I cut and paste everything
between the quotes into a run command.

What's causing the failure?

Many thanks,
--
Kenneth

If you email... Please remove the "SPAMLESS."

 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Tony McGuire

External


Since: Oct 14, 2008
Posts: 10



(Msg. 2) Posted: Wed Dec 17, 2008 11:10 am
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Kenneth wrote:

> What's causing the failure?

The space, as a guess. Have you tried wrapping the line in escaped quotes?

if not execute("\"\\K06\\K06 apps\\ten.bat\"") then
errorShow()
endif

Or better yet, ALSO include the drive letter starting it all off.





Tony

 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Jim Giner

External


Since: Mar 14, 2008
Posts: 25



(Msg. 3) Posted: Wed Dec 17, 2008 11:46 am
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

what is k06\k06? The chars between the quotes don't make sense as a command
that DOS would have understood. If the file "ten.bat" is stored in the apps
folder then that would be all you need (with the inclusion of a drive and
perhaps the beginning of the path if apps is not in the root). If K06\K06
is part of the path, then that space is certainly killing you as Tony
suggested.

"Kenneth" wrote in message

>
> Howdy,
>
> I run P9 with XP.
>
> I need to run a batch file from Paradox, but can't seem to
> get it happy.
>
> The line is:
>
> if not execute("\\K06\\K06 apps\\ten.bat") then errorShow()
> endif
>
> but when I run it, I get "error occurred trying to execute
> the specified program."
>
> The batch file runs properly if I cut and paste everything
> between the quotes into a run command.
>
> What's causing the failure?
>
> Many thanks,
> --
> Kenneth
>
> If you email... Please remove the "SPAMLESS."
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Kenneth

External


Since: Feb 12, 2008
Posts: 26



(Msg. 4) Posted: Wed Dec 17, 2008 11:50 am
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 17 Dec 2008 09:31:01 -0700, Tony McGuire
wrote:

>
>Kenneth wrote:
>
> > What's causing the failure?
>
>The space, as a guess. Have you tried wrapping the line in escaped quotes?
>
>if not execute("\"\\K06\\K06 apps\\ten.bat\"") then
> errorShow()
>endif
>
>Or better yet, ALSO include the drive letter starting it all off.
>
>
>
>
>
>Tony

Hi Tony,

Many thanks for the speedy response, but...

I tried:

if not execute(("\"\\K06\\K06 apps\\ten.bat\""))
then errorShow()
endif

but get the same error.

Also, you mention "the space" but I don't see one to
eliminate.

'any further thoughts?

All the best,
--
Kenneth

If you email... Please remove the "SPAMLESS."
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Kenneth

External


Since: Feb 12, 2008
Posts: 26



(Msg. 5) Posted: Wed Dec 17, 2008 11:53 am
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 17 Dec 2008 11:46:53 -0500, "Jim Giner"
wrote:
>
>"Kenneth" wrote in message
>
>>
>> Howdy,
>>
>> I run P9 with XP.
>>
>> I need to run a batch file from Paradox, but can't seem to
>> get it happy.
>>
>> The line is:
>>
>> if not execute("\\K06\\K06 apps\\ten.bat") then errorShow()
>> endif
>>
>> but when I run it, I get "error occurred trying to execute
>> the specified program."
>>
>> The batch file runs properly if I cut and paste everything
>> between the quotes into a run command.
>>
>> What's causing the failure?
>>
>> Many thanks,
>> --
>> Kenneth
>>
>> If you email... Please remove the "SPAMLESS."
>

>what is k06\k06? The chars between the quotes don't make sense as a command
>that DOS would have understood. If the file "ten.bat" is stored in the apps
>folder then that would be all you need (with the inclusion of a drive and
>perhaps the beginning of the path if apps is not in the root). If K06\K06
>is part of the path, then that space is certainly killing you as Tony
>suggested.

Hi Jim,

I just wrote to Tony that I had no space, but now I
understand what you are looking at...

Yes, K06 is the name of the system, and K06 Apps is the
share name of one of its disks. That was my attempt at
specifying the complete path after trying other approaches.

Assuming the problem to be the space, how should I specify
the path properly?

Many thanks,
--
Kenneth

If you email... Please remove the "SPAMLESS."
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Tony McGuire

External


Since: Oct 14, 2008
Posts: 10



(Msg. 6) Posted: Wed Dec 17, 2008 11:53 am
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Kenneth wrote:
> Yes, K06 is the name of the system, and K06 Apps is the
> share name of one of its disks. That was my attempt at
> specifying the complete path after trying other approaches.
>
> Assuming the problem to be the space, how should I specify
> the path properly?
>
> Many thanks,


WHOA!

Are you saying that K06 is a remote computer?

Then you need 4 backslashes to name the remote UNC drive (which resolve to 2
backslashes). All others just need the standard 2 backslashes.



--
---------------
Tony McGuire
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Jim Giner

External


Since: Mar 14, 2008
Posts: 25



(Msg. 7) Posted: Wed Dec 17, 2008 1:02 pm
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I agree with Tony. 4 slashes since a unc name has 2 slashes to begin with
and you have to escape both of them.

Even assuming that you can possibly run a batch file on another machine.
Perhaps you may have to re-write the bat file to reference the other machine
while storing it on your pdox-running machine.
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Kenneth

External


Since: Feb 12, 2008
Posts: 26



(Msg. 8) Posted: Wed Dec 17, 2008 1:12 pm
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 17 Dec 2008 13:02:47 -0500, "Jim Giner"
wrote:

>I agree with Tony. 4 slashes since a unc name has 2 slashes to begin with
>and you have to escape both of them.
>
>Even assuming that you can possibly run a batch file on another machine.
>Perhaps you may have to re-write the bat file to reference the other machine
>while storing it on your pdox-running machine.
>

Hi Tony & Jim,

I regret that I have confused matters with my lack of
detail...

The batch file, and Paradox, are both on the same system and
that system is named K06.

Our data files, forms, etc. are on a remote machine that is
nominally our server. ("Nominally" because the server
connects to the other systems as peer to peer.)

I tried the full path approach because my attempts to call
the batch file as C:\ten.bat failed with the now familiar
error.

Again, my apologies for the confusion, and thanks for any
further help,
--
Kenneth

If you email... Please remove the "SPAMLESS."
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Steven Green

External


Since: Jan 10, 2008
Posts: 49



(Msg. 9) Posted: Wed Dec 17, 2008 2:15 pm
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

to see if the space is the problem, change it temporarily to an underscore
and try it that way..

--
Steven Green - Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Oasis Trading Post
- Collectibles and Memorabilia
- Vintage and Custom Lego Creations

Diamond Software Group
- Paradox Support & Sales

Diamond Sports Gems
- Sports Memorabilia and Trading Cards
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Jim Giner

External


Since: Mar 14, 2008
Posts: 25



(Msg. 10) Posted: Wed Dec 17, 2008 4:05 pm
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If by system you mean 'SAME PC' then you don't need to specify this K06
thing, unless it is part of the DOS path to the file. But if (as it sounds)
this bat file is on a different PC from the one that your pdox call is being
made from, then you need it and you do need to change the syntax to \\\\.

> The batch file, and Paradox, are both on the same system and
> that system is named K06.
>
> Our data files, forms, etc. are on a remote machine that is
> nominally our server. ("Nominally" because the server
> connects to the other systems as peer to peer.)
>
> I tried the full path approach because my attempts to call
> the batch file as C:\ten.bat failed with the now familiar
> error.

AS for trying "C:\ten.bat" that would fail also - it needs to be
"C:\\ten.bat" or more appropriately (from your first example)
"C:\\apps\\ten.bat".
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Jim Giner

External


Since: Mar 14, 2008
Posts: 25



(Msg. 11) Posted: Wed Dec 17, 2008 4:09 pm
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I think your call should be

"\\\\K06\\K06 Apps\\ten.bat"
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Kenneth

External


Since: Feb 12, 2008
Posts: 26



(Msg. 12) Posted: Wed Dec 17, 2008 4:53 pm
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 17 Dec 2008 16:05:58 -0500, "Jim Giner"
wrote:

>If by system you mean 'SAME PC' then you don't need to specify this K06
>thing, unless it is part of the DOS path to the file. But if (as it sounds)
>this bat file is on a different PC from the one that your pdox call is being
>made from, then you need it and you do need to change the syntax to \\\\.
>
Hi Jim,

I am not in my office at the moment and so can't experiment,
but yes, when I wrote "system" I meant that the same machine
(named K06) is running Paradox, and has the batch file on
its C:\.

I will try your suggestions and let you know...

Many thanks, as before,
--
Kenneth

If you email... Please remove the "SPAMLESS."
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Tony McGuire

External


Since: Oct 14, 2008
Posts: 10



(Msg. 13) Posted: Wed Dec 17, 2008 4:53 pm
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Kenneth wrote:
> its C:\.


NEVER put anything in the root of c: (or any drive, for that matter).

Just that could be your problem.


--
---------------
Tony McGuire
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Anders

External


Since: Oct 15, 2008
Posts: 7



(Msg. 14) Posted: Thu Dec 18, 2008 4:25 am
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> The batch file runs properly if I cut and paste everything
> between the quotes into a run command.
>
> What's causing the failure?
>


I sometimes run into similar problems. A bat file that "should" execute does
not.

I have found that calling it in the following manner works.

Here is an example:

Execute("cmd /c start "+GetAliasPath(":WORK:")+"\\mybat.bat",No,
ExeShowNormal)

That is to start a bat file in the working dir, you can ofcourse adjust this
to:

Execute("cmd /c start "C:\\Folder\\mybat.bat",No, ExeShowNormal)

If you want to hardcode to run a bat-file located on the computer or:

Execute("cmd /c start "\\\\ComputerName\\Folder\\mybat.bat",No,
ExeShowNormal)

If you want to run a bat file that is located on another computer.


Best regards

Anders
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Jim Giner

External


Since: Mar 14, 2008
Posts: 25



(Msg. 15) Posted: Thu Dec 18, 2008 8:15 am
Post subject: Re: Trouble running BAT file from P9...? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Then if you're calling program is on the same box as the bat file, you
should only need to reference the drive letter and the path (folders) and
NOT any "machine" id (unc name). Sounds like it would be just c:\\ten.bat
in this case which as tony says is not good practice. You may not know this
(and it may no longer be true!), but in the old dos days there was a hard
limit on how much you could put into the root folder of a drive. Hence the
practice of puttting things into folders.
"Kenneth" wrote in message

> On Wed, 17 Dec 2008 16:05:58 -0500, "Jim Giner"
> wrote:
>
>>If by system you mean 'SAME PC' then you don't need to specify this K06
>>thing, unless it is part of the DOS path to the file. But if (as it
>>sounds)
>>this bat file is on a different PC from the one that your pdox call is
>>being
>>made from, then you need it and you do need to change the syntax to \\\\.
>>
> Hi Jim,
>
> I am not in my office at the moment and so can't experiment,
> but yes, when I wrote "system" I meant that the same machine
> (named K06) is running Paradox, and has the batch file on
> its C:\.
>
> I will try your suggestions and let you know...
>
> Many thanks, as before,
> --
> Kenneth
>
> If you email... Please remove the "SPAMLESS."
 >> Stay informed about: Trouble running BAT file from P9...? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
renaming a file - After I export a db file to a text file, I tried to rename it as a unique file. Since this process is going to happen every month, I would like to place the renaming process in a script. The script works until I try to rename it. The following is in..

Reading a paradox file - Hi all, I have a paradox file and I need to convert it into a word document. Is it possible ? If so can anyone tell me how to do it ?The paradox file itself is 4.5 MB.

Calling CHM Help File From a Form - How do I do this? I have no problem calling a .HLP file using the following: method keyPhysical(var eventInfo KeyEvent) var theKey String endvar if eventInfo.isPreFilter() then ;// This code executes for each object on the form theKe...

import a CSV file w/ First row of data as field names by p.. - I need to import a CSV comma delimited file which has First row of data as field names by program not interactive way. Pdox Win (v. 11) INTERACTIVE import has the check mark box for First row of data as field names. Unfortunately ObjectPAL..

write to paradox via web - I have a client that uses software developed in delphi. It uses paradox database files. Can these be written to from the web? I am familiar with php/mysql...is there a similar capability with delphi/paradox?
   Database Help (Home) -> Paradox All times are: Pacific Time (US & Canada)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]