I've fallen into ooRexx for some office improvement stuff and I need to move some files around in windows, and in my research I found the Reginald interpreter which is exactly what I need. Is it possible to call to it from, or load that functionality into an ooRexx program?
Asked
Active
Viewed 102 times
0
-
I presume you a talking about `Reginald rexx` ??. Reginald Rexx is very old now, what do you want to do that can not be done in oorexx ?? – Bruce Martin Dec 09 '20 at 02:15
-
I'm trying to use DIR commands to move, copy, and delete files. Am I wrong in thinking that ooRexx can't do this? – butterbaby Dec 09 '20 at 16:30
-
Yes - you are wrong. Simply enclose the Windows command in quotes as a statement For example: to clear the screen code "cls".. The Rexx interpreter will pass it to the operating system for processing - standard Rexx behaviour no matter which version of Rexx or operating system. – NicC Dec 10 '20 at 00:18
-
Thanks for your help, I have some terminal research to do now it seems. I get moving files around, but say I wanted to list a dir for the files inside and then parse what windows is sending to the interpreter with Rexx, how would I do that? – butterbaby Dec 10 '20 at 14:36
-
You would read the OORexx language reference and, in particular, the Rexx Utilities section and focus on SysFiletree. – NicC Dec 10 '20 at 15:18
-
I'll have a look, thanks again. – butterbaby Dec 10 '20 at 16:11
1 Answers
0
Writing code like
Method_1:
'some command'
is not the greatest way to do it. I always use the ADDRESS command, like this:
Method_2:
ADDRESS someenv 'some command'
to prevent accidentally sending something to the wrong environment. When you use Method_1 there is an implicit assumption that an ADDRESS was previously executed (or defaulted). In Method_2 its explicit. The difference is that if you later have to change the rexx code using multiple environments you might accidentally send a command to the wrong environment. Method_2 is safer.

Robert Schreiber
- 51
- 7
-
I proof it with this command: ```say address()``` - And if not ```COMMAND``` then i do: ```address command``` - And then ```say address()``` says ```COMMAND``` – koyaanisqatsi Aug 14 '21 at 11:26
-
-
Because it is not all the time wanted. Normal/Default is: ```REXX``` - The test with ```address()``` should clarify it and can be used as condition before do such things. – koyaanisqatsi Aug 14 '21 at 11:31