OS/2, eCS & ArcaOS - Technical > Utilities

How to change several files "Class Type" in one shot

(1/4) > >>

Martin Iturbide:
Hello

Long time ago, someone taught me on this forum to use FT to change the "WPS File type" in several files at once.
I wrote this to don't forget about it: "Changing the WPS File type on Several Files at Once"

But now I want to change the "Class Type" of several files at once. (Check the image attached to understand me better). I want to change several .lgo image files from "WPDataFile" to "MMImage" without going one by one. Is there a way?

Regards

Lars:
I only see two ways, a "clean" way and a "dirty" way:

1) "dirty" way: rewrite the ".CLASSINFO" EA: the structure itself is undocumented but the CWMM classes source code contains a description of that EA.

2) "clean" way: write a WPS class that provides a user interface and that uses the undocumented "ClassAssociationManager" class to set the object class. That is exactly the class the existing user interface uses. But that would need some reengineering to find out the call parameters and return values of the methods that class contains.

There currently is no user interface to do that for multiple files.

Lars:
I just realized that in the past I had already started with the "clean" way and already reverse engineered the call parameters and return values of the "ClassAssociationManager" methods.

Maybe I will be able to come up with something.

Martin Iturbide:
Thanks Lars for the feedback.

It would be awesome if you can produce something and I appreciate that.
I may be looking like a simple command line tool (like FT) where I can run something like: ClassCh *.lgo "MMIMAGE"
... or whatever comes to your mind  ;D

Regards

Lars:

--- Quote from: Martin Iturbide on October 12, 2023, 03:01:57 am ---Thanks Lars for the feedback.

It would be awesome if you can produce something and I appreciate that.
I may be looking like a simple command line tool (like FT) where I can run something like: ClassCh *.lgo "MMIMAGE"
... or whatever comes to your mind  ;D

Regards

--- End quote ---

I would love to create a command line tool but I cannot. That's because I need object pointers of the file objects whose object class (type) you want to change.
And I will only get them on drag and drop when these objects are dragged and dropped onto a window. Therefore the minimum would be to create a dialog box with a container to allow drops of multiple files.

A command line tool would only allow the "dirty" hack and I am reluctant to implement that because I don't know the side effects.
I'll have to think about that a little more ...

Navigation

[0] Message Index

[#] Next page

Go to full version