INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Help with Clipper "RUN" command.

Help with Clipper "RUN" command.

(OP)
I am trying to call a batch file from within my clipper app to execute the printing of a crystal report. The batch file is called "Report.bat" and it contains one line as follows
 "cviewbatch11.exe @mycommands.txt"
The text file just passes some printing parameters to the exe file. The process works fine when I type "Report" at the DOS command shell prompt. But when I call it from within my clipper app as "Run Report" it calls the cviewbatch11.exe @mycommands.txt and then issues a "BAD COMMAND OR FILENAME".
I already use this calling of batch files to run NET USE functions and they work fine, I do not understand why the Bad Command is being issued.
Any guidance will be greatly appreciated!
 

RE: Help with Clipper "RUN" command.

It sounds like Clipper can't 'see' your executable at runtime - the "net use" commands would be visible regardless of where your current directory was, but your executable may not be.

Try being specific in the run command - if in doubt, use a batch file with a different name (report probably being a reserved word) and put the path to the report in the command - and the path to the executable in the batch file:

CODE

run c:\mybats\reptrunner.bat

CODE --> reptrunner.bat

c:\myreportprogs\cviewbatch11.exe @c:\myreportprogs\mycommands.txt

 

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: Help with Clipper "RUN" command.

(OP)
Thanks Griff!

Tried your suggestion. Renamed Report.bat to MyRep.bat
edited it to read:

d:\flaman\cviewbatch11.exe @d:\flaman\mycommands.txt

Same thing happens. Works fine from the Command Prompt gives
my a "Bad Command or File Name" when I run the command
"Run MyRep.bat" from within my Clipper App.

Brian
 

RE: Help with Clipper "RUN" command.

Can your application see myrep.bat though?

Try being specific about the call

RUN c:\flaman\myrep.bat
 

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: Help with Clipper "RUN" command.

(OP)
Thanks again Griff! Got it figured out, sometimes it's hard
to see the forest for the trees! Even though it ran fine if
I called it from the Command prompt, Clipper must obviously call an older version of a DOS Shell as it would not recognize the Long-File Name "cviewbatch11.exe", I renamed the exe to just "cview.exe" and away it went. You were definetly on the right track, if not for your suggestions I would most likely still be trying to figure it out.

Thanks Again!  

RE: Help with Clipper "RUN" command.

No problem, glad to help.

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close