[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
NT call system exemple
Hi,
This is a sample that we use at the office
The following CALL SYSTEM command executes the DOS 'dir' command of
the current directory and spools the result into the 'file.out' file:
begin-procedure main
let $cmd = 'cmd /c @start /min /wait cmd /c '
let $command = $cmd || '"dir *.* >file.out"'
call system using $command #rtrn_status wait
end-procedure !main
Hope this help you
Franck,
Eric Dimick Eastman wrote:
>
> Chris,
>
> Unfortunately it is not that simple. "dir" is nor an executable file.
> It is a special code that is recognised by the DOS command interpreter.
> I think that "call system using 'c:\path\to\command\command.com dir'"
> will work. Obivously replace "c:\path\to\command\" with the actual path
> to where your command.com file lives. I think that you might also have
> to set some command line options on command.com to get the behaviour you
> want. Fortunately I have not had to use DOS (or its winX psuedonyms)
> for anything more than a gorified terminal for some time.
>
> I hope this helps,
> Eric
>
> Wanko, Christopher G, CFCTR wrote:
> >
> > > What is the syntax for executing a simple DOS 'Dir' command from sqr?
> >
> > <singing> Reeeeeeeeeeead... the effin'... manuaaaaaaaaalllll....
> > .... because... on page 129... of the SQR Command... Reference...
> > it says...
> >
> > <all together now>
> > "CALL!"
> > "SYSTEM!"
> > "USING!"
> > "'DIR'!"
> > "#s!"
> >
> > <guitar solo>
> >
> > "Get the manuals! Yeah man, get the manuals!"
> >
> > .... Heavy Metal Day is Today...
begin: vcard
fn: Franck Masson
n: Masson;Franck
org: Sqribe Technologie Europe
adr;dom: 1 bis rue du petit clamart Bat B;;ZI Velizy Plus;78140 Velizy Villacoublay;;;
email;internet: franck.masson@sqribe.com
title: Responsable developpement partenaire
tel;work: 01 40 83 15 52
tel;fax: 01 40 83 06 59
tel;home: 06 12962751
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard