Author Topic: Super file type (or whatever it's called)  (Read 2567 times)

piovrauz

  • Posts: 967
Super file type (or whatever it's called)
« on: 28 May '14 - 17:59 »
Indirectly related to XMPlay: how can someone (I) create a "Super file type" where munltiple extension are grouped under the same filetyp, and so show same icon and are opened by the same program?
I realize that could be done with normal filtypes, but the file ordering in explorer is not alphabetical, since they are different filetypes.
XMPlay does that, so I see "1.xm, 2.it, 3.s3m, 4.mod" and not "4.mod, 2.it, 3.s3m, 1.xm".
I searched around but couldn't find any sensible documentation, let alone an howto for dummies.
Any help appreciated (I know it's not really XMPlay related)

saga

  • Posts: 2179
Re: Super file type (or whatever it's called)
« Reply #1 on: 28 May '14 - 20:43 »
If you are feeling confident with using RegEdit, create a folder in the HKEY_CLASSES_ROOT folder called e.g. "MyFileType" (XMPlay's own folder is called "XMPlay" if you want to have a look at it). There you should create the sub folder hierarchy MyFileType\shell\Open\command. In the command folder, set the "(Default)" string to the application to open the files with (e.g. "C:\XMPlay\xmplay.exe" "%1"). You may also create the folder "DefaultIcon" inside the "MyFileType" folder to associate a default icon (again, fill it into the "(Default)" string).
Now, for your own file types that should use this type, create the appropriate folders right inside HKEY_CLASSES_ROOT (e.g. ".it"). Now set their "(Default)" value to "MyFileType" and you're done. You may have to log out and log in again for the changes to take effect, I think.

Quote
Any help appreciated (I know it's not really XMPlay related)
That's what the off-topic forum is for. ;)

piovrauz

  • Posts: 967
Re: Super file type (or whatever it's called)
« Reply #2 on: 3 Jun '14 - 19:41 »
Oh, I completely missed this answer, I didn't even SEE it. Tch.
Thanks Saga, I will try that, I have no problem poking ar the registry (when I know what I'm doing).
Now, it was exactly something like that I was thinking it would've been necessary, so time to see how it works out.
"off-topic forum" -> eh, I only use the XMPlay forum, didn't know there was an off-topic section, but obv it was there.

piovrauz

  • Posts: 967
Re: Super file type (or whatever it's called)
« Reply #3 on: 4 Jun '14 - 10:08 »
OK, it works beautifully. Thanks a lot saga.
Since I use Noreg=1 secret setting I don't have the "XMPlay" folder, but with saga tips were enough.
No need to log out and login, just closing explorer and reopening was enough.
I did have to add a key under my "global" filetype, called "FriendlyTypeName", to have the files go by alphabetical order by name ignoring the extension.
Here's a .reg sample in case anyones is interested.


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\XMPlay.Tracker]
"FriendlyTypeName"="XMPlay.Tracker"

[HKEY_CLASSES_ROOT\XMPlay.Tracker\DefaultIcon]
@="C:\\Users\\Customize\\Icone XP\\JustPlayMeBlue.ico"

[HKEY_CLASSES_ROOT\XMPlay.Tracker\shell]

[HKEY_CLASSES_ROOT\XMPlay.Tracker\shell\open]

[HKEY_CLASSES_ROOT\XMPlay.Tracker\shell\open\command]
@="\"C:\\Program Files (x86)\\XMPLAY\\xmplay.exe\" \"%1\""

[HKEY_CLASSES_ROOT\.it]
@="XMPlay.Tracker"

[HKEY_CLASSES_ROOT\.mod]
@="XMPlay.Tracker"

[HKEY_CLASSES_ROOT\.s3m]
@="XMPlay.Tracker"

[HKEY_CLASSES_ROOT\.xm]
@="XMPlay.Tracker"


P.S.: can some mod move this post to the relevant "offtopic" forum section? Thanks.

« Last Edit: 4 Jun '14 - 10:25 by piovrauz »