0

This is just a small annoyance but the Heroku Procfile does not have an extension. This causes me to have to select an application for it, each time I double click it.

Normally after selecting an application for a file, the system remembers and I don't have to do it again.

I'm wondering if I can just add a random extension and it will still work?

Something like

Procfile.procfile

or

Procfile.txt

Also because it has no extension there is no icon associated with it as well if this is not obvious.

cade galt
  • 3,843
  • 8
  • 32
  • 48

2 Answers2

1

From Windows IT pro:

Normal files with an extension can have a program associated however this is not the case with files that don't have an extension. If you double click on one and select an application and check the box to always use that application it is ignored and every time you select a file you have to choose the application.

You can force this using the registry:

  • Start the registry editor (regedit.exe)
  • Move to HKEY_CLASSES_ROOT
  • From the Edit menu select New - Key
  • Enter a name of '.' and press Enter (don't type the quotes)
  • Select the new '.' key
  • Double click the (Default) value
  • Change to the HKEY_CLASSES_ROOT used to open, e.g. NOTEPAD for the notepad.exe application NOTEPAD
  • Click OK

alt text

If you now double click on a file with no extension it will open with the application selected.

To check what an existing application used look at its entry under HKEY_CLASSES_ROOT, e.g. HKEY_CLASSES_ROOT.doc uses Word.Document.8 so if you wanted this as your default editor you would change HKEY_CLASSES_ROOT.(Default) to Word.Document.8.

Any method which avoids the need to edit the registry is as follows:

  • Open Explorer - View - Folder Options... - File Types - New Type:
  • Description of type: Text (any description, you can type in)
  • Associated extension: . (just a period)
  • Actions: - new...
  • Action: open
  • Application used to perform action: c:\winnt\notepad.exe
  • Click ok, then ok again
MadRabbit
  • 2,460
  • 2
  • 17
  • 18
1

Procfile with an extension will not work. From https://devcenter.heroku.com/articles/procfile:

A Procfile is a file named Procfile. It should be named Procfile exactly, and not anything else. For example, Procfile.txt is not valid. The file should be a simple text file. The file must be placed in the root directory of your application. It will not function if placed in a subdirectory.

AlexChaffee
  • 8,092
  • 2
  • 49
  • 55