Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: File association commands  (Read 4336 times)

0 Members and 1 Guest are viewing this topic.

neljan

    Topic Starter


    Adviser

    Thanked: 1
    • Yes
  • Experience: Familiar
  • OS: Windows XP
File association commands
« on: January 10, 2008, 07:08:11 PM »
Hello my beautiful friends!

I would like to associate a specific applications command to a file, rather than just associating the application & was wondering if it were possible?

To be specific, I have added a 'convert' entry in the context menu for AVI files with the command to use Windows Media Encoder (WME). Obviously, WME attempts to open the file as if it were a WME project & so doesn't recognise the file, thus I have to run the conversion wizard within the program & search for the AVI file again which makes the whole process pointless  ::)

So... how do we do it chaps?

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: File association commands
« Reply #1 on: January 10, 2008, 09:31:05 PM »
If you want it to always from now on handle an AVI with a specific AVI handler program, you can right click on the AVI file, and go to Open With-> and select Choose  Program, and scroll through all the programs until you find the program you want to always have associate with that file extension type, and check the check box that states "Always use the selected program to open this type of file".

You should now find that all AVI's will run from the program selected. If you selected the wrong one you can reassociate with the correct one.

Hope this helps!

Dave

neljan

    Topic Starter


    Adviser

    Thanked: 1
    • Yes
  • Experience: Familiar
  • OS: Windows XP
Re: File association commands
« Reply #2 on: January 10, 2008, 09:51:18 PM »
Hi Dave

Firstly, I'm using XP and the 'open with' command is only available if I right click the file, then select properties > open with then search. However, I have installed a program called OpenExpert which adds an 'open with...' command in the context menu for all files which is very handy as it allows me to customize multiple associations with files & open with a chosen application with one click (very handy tool if you don't have it, I recommend it):

http://www.baxbex.com/openexpert.html

However, my problem (as described in my original post) is not associating a file with an application (open with) but actually associating a command in an application to a file.

I'm not sure if it can be done to be honest...

Deerpark



    Egghead
  • Thanked: 1
    Re: File association commands
    « Reply #3 on: January 11, 2008, 04:29:47 AM »
    I believe that in order to do that the program in question (WME) will need to support it via a command line switch. WME would need to have a command telling it the file you're passing to it is a file you want to convert.
    One way of finding out whether an application have any command line options is to open an cmd window, navigate to the folder with the WME executable and type [nameofexecutable].exe -? (or in some cases /?). This will usually output any command line options available for the given executable.

    Ohh and btw. there is another way of getting "open with" in XP.  Hold down Shift while you right click a file.

    Any sufficiently advanced technology is indistinguishable from magic.
    Arthur C. Clarke (1917 - 2008)

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: File association commands
    « Reply #4 on: January 11, 2008, 07:59:50 AM »
    cool

    I didnt know of that shift+right-click option for open with

    Thanks!

    neljan

      Topic Starter


      Adviser

      Thanked: 1
      • Yes
    • Experience: Familiar
    • OS: Windows XP
    Re: File association commands
    « Reply #5 on: January 11, 2008, 11:56:40 AM »
    Deerpark,

    Is cmd an abbr for 'command prompt'?

    I looked in the command promt (I still call this DOS btw) but for some strange reason I couldn't find my 'program files' dir (where WME is installed) ???

    Deerpark



      Egghead
    • Thanked: 1
      Re: File association commands
      « Reply #6 on: January 11, 2008, 12:27:19 PM »
      Yep I meant command prompt... I'm just damaged from typing cmd in the run box too many times.
      Can't tell you why you can't see program files... the folder should be there. Do you have it hidden or anything like that?
      Any sufficiently advanced technology is indistinguishable from magic.
      Arthur C. Clarke (1917 - 2008)

      neljan

        Topic Starter


        Adviser

        Thanked: 1
        • Yes
      • Experience: Familiar
      • OS: Windows XP
      Re: File association commands
      « Reply #7 on: January 11, 2008, 12:29:27 PM »
      No... I'm always in & out of there... strange eh?

      Deerpark



        Egghead
      • Thanked: 1
        Re: File association commands
        « Reply #8 on: January 11, 2008, 12:45:16 PM »
        Yep.
        Have you tried accessing it anyway? I.e. type cd program files even though you can't see it?
        Any sufficiently advanced technology is indistinguishable from magic.
        Arthur C. Clarke (1917 - 2008)

        neljan

          Topic Starter


          Adviser

          Thanked: 1
          • Yes
        • Experience: Familiar
        • OS: Windows XP
        Re: File association commands
        « Reply #9 on: January 11, 2008, 01:40:24 PM »
        Now why didn't I try that anyway?   ::) well done!

        So I tried both -? and /? but it just opened the application (in windows) is this supposed to happen?

        I noticed that theres also a WMCmd file in its directory, described as a 'VBScript Script file' if that's any good?

        Deerpark



          Egghead
        • Thanked: 1
          Re: File association commands
          « Reply #10 on: January 11, 2008, 07:53:27 PM »
          So I tried both -? and /? but it just opened the application (in windows) is this supposed to happen?
          That means it is not responding to the switches. So that's a no go.

          But yes the WMcmd.vbs file may be the way to go. I'm not any good at vbs scripting but I know a few of the other people on the forum is, like ghostdog74 for example.
          Check out these links for a start:
          http://www.euphoriaaudio.com/tutorials/wmestart.php
          http://www.microsoft.com/windows/windowsmedia/howto/articles/AutomatingEncoding.aspx

          And there's plenty more on Google if you search for "wme Wmcmd".
          Any sufficiently advanced technology is indistinguishable from magic.
          Arthur C. Clarke (1917 - 2008)

          neljan

            Topic Starter


            Adviser

            Thanked: 1
            • Yes
          • Experience: Familiar
          • OS: Windows XP
          Re: File association commands
          « Reply #11 on: January 11, 2008, 07:54:34 PM »
          Thanks DeerPark, you're a legend!

          Deerpark



            Egghead
          • Thanked: 1
            Re: File association commands
            « Reply #12 on: January 11, 2008, 08:01:47 PM »
            You're very welcome. Let's hope I've pointed you in the right direction and not on a wild goose chase. :D
            Any sufficiently advanced technology is indistinguishable from magic.
            Arthur C. Clarke (1917 - 2008)

            neljan

              Topic Starter


              Adviser

              Thanked: 1
              • Yes
            • Experience: Familiar
            • OS: Windows XP
            Re: File association commands
            « Reply #13 on: January 11, 2008, 08:04:16 PM »
            I have another post that you may be able to help me with aswell:

            http://www.computerhope.com/forum/index.php/topic,49318.0.html

            (just incase you missed it...)

            Thanks again

            Deerpark



              Egghead
            • Thanked: 1
              Re: File association commands
              « Reply #14 on: January 11, 2008, 08:18:07 PM »
              Yeah sure I'll take a look at it and play around with context menu a little for my self.
              Don't expect an answer earlier than Sunday though.
              Any sufficiently advanced technology is indistinguishable from magic.
              Arthur C. Clarke (1917 - 2008)