Author Topic: How to change several files "Class Type" in one shot  (Read 13140 times)

Lars

  • Hero Member
  • *****
  • Posts: 1276
  • Karma: +65/-0
    • View Profile
Re: How to change several files "Class Type" in one shot
« Reply #15 on: October 22, 2023, 03:19:16 pm »
I think you have given yourself the answer:

only if the object class is WPPngProgramFile (or XWPProgramFile if you do not have PNG desktop installed) will you see the module and resource info pages (for DLLS and EXEs) and the Program and Session pages (for EXEs).

Since I am a programmer, I find the Module and Resource pages for DLLs helpful but you can decide for yourself. My "AssocCls" tool would make a DLL file a XWPProgamFile/WPPngProgramFile object because that is the most specialized object class for a DLL file.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4749
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: How to change several files "Class Type" in one shot
« Reply #16 on: October 22, 2023, 03:52:23 pm »
Hi Lars

..My "AssocCls" tool would make a DLL file a XWPProgamFile/WPPngProgramFile object because that is the most specialized object class for a DLL file.

I have just a little issue here. With "AssocCls" (the latest version on hobbes), if I drag a DLL file into it, it does not change it to "XWPProgramFile/WPPngProgramFile", it remains as WPPngDataFile. The only thing special on my ArcaOS 5.1 VM is that I like to install the full XWorkplace program.

Regards
« Last Edit: October 22, 2023, 05:37:49 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1276
  • Karma: +65/-0
    • View Profile
Re: How to change several files "Class Type" in one shot
« Reply #17 on: October 27, 2023, 01:21:25 am »
Looks like if a DLL is in use, it cannot be changed this way. Too bad.
Maybe you can try and run "unlock.exe" against the DLL you want to change before you attempt to drop it onto the AssocCls Object.
« Last Edit: October 27, 2023, 11:06:45 am by Lars »

Lars

  • Hero Member
  • *****
  • Posts: 1276
  • Karma: +65/-0
    • View Profile
Re: How to change several files "Class Type" in one shot
« Reply #18 on: October 29, 2023, 12:45:13 pm »
Per coincidence I found the following: if you use EAUTIL.EXE to strip a file of all of its EAs, then, the object will automatically revert back to the most specialized class there exists when the object is again displayed in a folder.

To strip EAs of all .ICO files, do something like this: for %F in (*.ico) do @eautil.exe %F NUL /S

There is a drawback to this: because ALL EAs of a file are stripped in this way, so is the .LONGNAME EA which is the EA holding an objects long name/title.

So, the easiest thing would be to write a tool that strips a file of all its EAs except for the .LONGNAME EA (or equivalently, one that saves the .LONGNAME EA, strips off all EAs and restores the .LONGNAME EA).
« Last Edit: October 29, 2023, 12:46:51 pm by Lars »