Returning items from Command line?

dayv2005

Member
Ok this is something i was wondering if it is possible to do. I'm running a batchfile from a procedure.

and in this batch file I'm doing a grep command on let's say and EmailClass.p

so now it searchs our source and in the command it will display every .w .p .r that has emailclass.p in its source.

I was wondering if there was a way to return all these file names from this cmdline back to progress.

The reason im wondering is im thinking about creating a dev app for our programmers to use?

and if this is possible does anyone have any idea on how this would be done?
 
Well i never though of that,thats a good idea.

THe only problem is Im using MKS toolkit and i dont know if you can save to txt with that.
 
It should , any command line utility or application in Windows can be redirected to a text file.

dir *.* > text.txt


grep something > res.txt
 
Is there something wrong with:

Code:
define variable x as character no-undo.

input through value( "batch.bat" ).
repeat:
  import x.
  /* do something with x... */
end.
 
WHen i do this i run my bat in silent but during the import theirs a blakc dos screen that pops up briefly. Is there any way to have that hide aswell?
 
*bump*

Exactly my question as well.
I always wondered why os-command has a silent option and input through has not.
 
I think that is to do with Windows, as I regularly use frontend converters for media files, document files (ps2pdf, jpeg2ps etc.), even my compiler for PocketPC applications (non microsoft) pops up dos boxes, even if it displays nothing, then disappears, even if there is an error...

annoying, as they tend to steal focus, so if you are typing away in an email window... AARRGGHH!! ... half a message...

Actually, come to think of it, if you create a shortcut there might some settings you can set to make it appear minimized, then you can just use the shortcut...
 
If you don't want the DOS screen appearing, try using both of the above approaches, something like:


define variable x as character no-undo.
define variable outfilename as char initial "c:\test\batch.out" no-undo.

os-command silent value ("batch.bat > " + outfilename).

input from value(outfilename).
repeat:
import x.
/* do something with x... */
end.
 
If you don't want the DOS screen appearing, try using both of the above approaches, something like:


define variable x as character no-undo.
define variable outfilename as char initial "c:\test\batch.out" no-undo.

os-command silent value ("batch.bat > " + outfilename).

input from value(outfilename).
repeat:
import x.
/* do something with x... */
end.

I like this way of doing not to bad. In the future i will alter that code to use it this way.

Thanks
 
Back
Top