Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 01 APR 2009 03:43:01PM Mat Kelly wrote:

I am attempting to "copy" PCL code to a printer in the same way that the DOS command behaves, i.e. COPY C:\MYPCLCODE \\MYSERVER\MYNETWORKPRINTER .

This command works in DOS, but my attempt at running the command in OI:

Y=Utility("RUNWIN","COPY C:\MYPCLCODE \\MYSERVER\MYNETWORKPRINTER",0)

…appears to have no effect. How to I go about performing this task from OI?


At 01 APR 2009 04:27PM Jared Bratu wrote:

I think COPY is part of the command prompt interpreter so it can’t be called directly. There is no COPY.EXE program to execute. Check the command line arguments for CMD.EXE or START.EXE. I think CMD.EXE has a /C flag so it executes a specific command, like COPY, before exiting. START.EXE might do a similar function.


At 01 APR 2009 06:23PM [url=http://www.srpcs.com]SRP[/url]'s Kevin Fournier wrote:

SRP Utilities has a method called SRP_Run_Command that can do this for you. It automatically recognizes "built-in" commands such as COPY, IPCONFIG, etc. It also lets you reroute the output to a variable, edit box, etc. SRP Utilities is free. Feel free to download and read the accompanying help file on SRP_Run_Command.

kfournier@srpcs.com

SRP Computer Solutions, Inc.


At 02 APR 2009 03:08AM Simon G Wilmot wrote:

Hi Mat,

Jared is basically right - see below for code snippet. Use what you need from this.

Simon

Command=CMD /C COPY ":Location:"TEST1.TXT "

Command := "+ ":Location:"TEST2.TXT "

Command := Location:"TEST.TXT /Y"

RetVal=UTILITY("RUNWIN",COMMAND,-1)


At 02 APR 2009 10:36AM Mat Kelly wrote:

Thanks for the help. That did the job.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/bf4c7da31f531b3d8525758b006c4f4b.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1