Questions tagged [file-association]

A file association associates a file with an application capable of opening that file. More commonly, a file association associates a class of files (usually determined by their filename extension, such as .txt) with a corresponding application.

413 questions
105
votes
11 answers

Sublime as default editor

Is there a way to set Sublime Text as the default text editor for file formats on Windows 7? Also, if anyone knew a Sublime Text Tutorial or Wiki that would be really helpful.
doque
  • 2,723
  • 6
  • 27
  • 44
97
votes
12 answers

Windows is not passing command line arguments to Python programs executed from the shell

I'm having trouble getting command line arguments passed to Python programs if I try to execute them directly as executable commands from a Windows command shell. For example, if I have this program (test.py): import sys print "Args: %r" %…
mckoss
  • 6,764
  • 6
  • 33
  • 31
96
votes
9 answers

How to execute Python scripts in Windows?

I have a simple script blah.py (using Python 2): import sys print sys.argv[1] If I execute my script by: python c:/..../blah.py argument It prints argument but if I execute script by: blah.py argument error occurs: IndexError... So arguments do…
ton4eg
  • 1,372
  • 1
  • 10
  • 10
92
votes
3 answers

Open file with associated application

i want to ask for help with opening a file from c# app with associated app. I tried this: ProcessStartInfo pi = new ProcessStartInfo(file); pi.Arguments = Path.GetFileName(file); pi.UseShellExecute = true; pi.WorkingDirectory…
Zavael
  • 2,383
  • 1
  • 32
  • 44
65
votes
9 answers

Associate File Extension with Application

I've written a program that edits a specific filetype , and I want to give the user the option to set my application as the default editor for this filetype (since I don't want an installer) on startup. I've tried to write a re-useable method that…
User2400
  • 2,373
  • 2
  • 20
  • 22
50
votes
5 answers

Change file type association in PyCharm

I have a file in PyCharm and its used to be just a .txt file. Now I wanted to use .rst (reStructuredText). I know that when I open a file without an ending for the first time PyCharm asks me what kind of file it is and how the syntax should…
cwoebker
  • 3,158
  • 5
  • 27
  • 43
34
votes
4 answers

How can I simply "run" lisp files

Python When I learned Python I installed it on windows with a nice gui installer and all .py files would automatically run in python, from the command line or explorer. I found this very intuitive and easy, because I could instantly make plain text…
AnnanFay
  • 9,573
  • 15
  • 63
  • 86
28
votes
7 answers

Add a new file association in Windows 7

With Windows XP I could use the Control Panel to add a new file extension, associate it with a program, and assign an icon to it. I did that using Folder Options in the Control Panel. Folder Options has a tab in it called "File Types". But Windows…
Peter
  • 1,292
  • 4
  • 15
  • 33
23
votes
4 answers

File association in Inno Setup

I am using Inno Setup and am trying to associate a program that is located in the Program Files (x86) in Windows 7. I have the following: #define MyAppName "MyView" #define MyAppExeName "MyView.exe" [Setup] AppName={#MyAppName} [Registry] Root:…
user1429254
  • 327
  • 1
  • 3
  • 10
21
votes
1 answer

Associating App with Epub format

I'm at a loss for getting my application to register with epub files on a mobile device. I have a set of intent filters in my android manifest, but it still will not open with epub files on the sd card. When I go through the File Explorer app, it…
Jason
  • 13,563
  • 15
  • 74
  • 125
19
votes
3 answers

How to associate a Windows application with a particular file type but share that association with other applications?

If I create a new app, and associate with, say, the .xml file extension on a particular computer, when someone double clicks the .xml file, it will launch my app and pass the file as parameter. But Windows seems to know what other files have the…
zumalifeguard
  • 8,648
  • 5
  • 43
  • 56
18
votes
3 answers

Associate file extension to python script, so that I can open the file by double click, in windows

I want to do the following: Save numeric data in a CSV-like formatting, with a ".foo" extension; Associate the ".foo" file extension with some python script, which in turns opens the .foo file, reads its content, and plots something with a plotting…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
18
votes
4 answers

ClickOnce application does not start through Process.Start("x.abc") with *.abc associated to the ClickOnce application

I have successfully developed and deployed a ClickOnce application which registers an associated file extension, for instance *.abc. When I click on a file named x.abc or if I type x.abc from the command prompt, the ClickOnce application starts, and…
Pierre Arnaud
  • 10,212
  • 11
  • 77
  • 108
16
votes
4 answers

MacOSX - File extension associate with application - Programmatically

I'm trying to get my program to automatically associate certain file extensions to be opened by it but I'm not sure how to do that in MacOSX. I'm not asking how to associate a program with a file extension in the GUI, I want to be able to program…
Nick
  • 3,096
  • 3
  • 20
  • 25
15
votes
7 answers

How to get icon and description from file extension using Delphi?

Basically I have a TcxGrid which will be listing various files names and I'd like to give further details based on the file extension, specifically it's description (e.g. for .PDF it's "Adobe Acrobat Document") and it's related icon. I notice there…
Pauk
  • 2,623
  • 3
  • 26
  • 28
1
2 3
27 28