• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 378
  • Last Modified:

REXX file ext. association

I should like to do the following:

Associate a file extension with an executable so that dropping a file object on another file (object pointing to a file) with such an extension will invoke the executable using the filespecs of the dropped and "receiving" file objects as parameters.

For instance, suppose I've got the executable "CONCFILE.CMD" which contains the line "copy %1 + %2 %1". I would then want to associate this executable with a file extension, let's say ".TST", so that dropping a file object onto a file (object) having the extension ".TST" would invoke the executable, with the result that the contents of the second file are added to those of the first.

Of course, double-clicking a ".TST" file object would still have to result in the "normal" associated executable (associated using e.g. AssoEdit) being called.

Can this be done using REXX?
0
degeus
Asked:
degeus
  • 2
  • 2
1 Solution
 
timurCommented:
No.  When you drop object 1 onto object 2, what you're doing
is effectively starting object 2 and passing object 1 as
a parameter.  What you want to do is to have object 2 start
object 3, and this can only happen if object 2 is programmed
to do so.  A .TST file is not a program.  You would probably
have to create a new SOM class and integrate it with the
WPS.  This could be a very powerful feature, but it would
definitely require a new WPS class, which is very hard, if not
impossible, to write in Rexx.
0
 
degeusAuthor Commented:
Mmm, I was afraid so. Thanks for confirming my suspicions, though.

0
 
timurCommented:
If you do develop such a WPS class, and keep it generic enough (perhaps with a REXX interface even), it could be EXTREMELY powerful - and you might actually make some decent money selling it.  However, I know nothing about WPS programming.  Stardock might be interested in it as an extension to Object Desktop, though.
0
 
degeusAuthor Commented:
Right, perhaps I should delve deeper into WPS programming - and who knows? I might uncover undreamt of riches (I doubt it, though, not at the speed I'll be learning SOM/WPS <g>).
Thanks for the comment,

Regards,

Marcus de Geus (Delft, NL).
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now