Results 1 to 8 of 8
  1. #1
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Exporting the Registered File Types

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Loungers

    Is there a way I can export, say as a CSV or even simple text list, the list of registered file types that is on my Windows 2000 Pro PC?

    Thanks a Million
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Exporting the Registered File Types

    You could use RegEdit to export HKEY_CLASSES_ROOT, but what are you going to do with it? It wouldn't be a good idea to import itas a whole on another PC.

  3. #3
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Exporting the Registered File Types

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> Hans

    No this is not to share between two PCs, its for something I am working on to deal with unknown files, and how best to assign an application to these files so that they become known files.

    We are getting a lot of attachments that have no extensions, and I have a theory that may help in eliminating this problem. We can't send a reply to the sender because that would take a huge amount of time and effort, so we have to deal with this on our end.

    Thanks

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  4. #4
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Exporting the Registered File Types

    If you are proficient or at least familiar with VB/VBA, you can import the attached text file (exported code module, rename as "*.BAS") into a VB or VBA project in order to generate a list of registered file extensions and the type of file they represent, as far as Windows is concerned. To test, run the GetFileTypeList sub. This procedure calls RegEnumKeyEx function to loop thru the keys under HKEY_CLASSES_ROOT; while the SHGetFileInfo API function populates a SHFILEINFO data structure, from which the file type is determined for each key enumerated. See attached code for details. The results are written to a tab-delimited text file, code can be modified for desired textfile format (use Write instead of Print if text delimiters are required), different path, etc.

    Sample output:

    .323 H.323 Internet Telephony
    .386 Virtual device driver
    .aca Microsoft Agent Character File (HTTP format)
    .acf Microsoft Agent Character File (HTTP format)
    .acg Microsoft Agent Preview File
    .acl AutoCorrect List File
    .acs Microsoft Agent Character File
    .acw Accessibility Wizard settings
    .ADE Microsoft Access Project Extension
    .adn Microsoft Access Blank Project Template
    .ADP Microsoft Access Project

    ...and on and on....

    HTH
    Attached Files Attached Files

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Exporting the Registered File Types

    Very nice, Mark. Thanks for posting this.
    -Mark

  6. #6
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Essex, England
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Exporting the Registered File Types

    The VBA solution is elegant but there's a simpler way. The ASSOC command will list all of the recognised file extensions along with what kind of file the system thinks they are and the FTYPE command will list these file types, along with the applications the system will call to open them. Run these at the Command Prompt and pipe the output from each to a text file (e.g. ASSOC >C:tempassoc.txt). Use Excel to open these files on two tabs of a worksheet then Match and Index to produce a definitive list of extension plus filetype plus application.
    Regards,

    Steve

    "A good friend will help you move; a really good friend will help you move a body"

  7. #7
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Exporting the Registered File Types

    How useful, I had never come across those commands before. <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>

    StuartR

  8. #8
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Exporting the Registered File Types

    Wow, the things we learn here in The Lounge ! Thanks for this, Steve, I've added this post to my reminders list so I can find it again in some month when I've forgotten. <img src=/S/smile.gif border=0 alt=smile width=15 height=15> By the way, the two commands are present in XP Pro as I had expected they would be.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •