Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Reference
Command Window
 Open File Command

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio
Open File Command

Opens an existing file and allows you to specify an editor.

File.OpenFile filename [/e:editorname]
filename

Required. The full or partial path and file name of the file to open. Paths containing spaces must be enclosed in quotation marks.

/e:editorname

Optional. Name of the editor in which the file will be opened. If the argument is specified but no editor name is supplied, the Open With dialog box appears.

The /e:editorname argument syntax uses the editor names as they appear in the Open With Dialog Box, enclosed in quotation marks.

For example, to open a file in the source code editor, you would enter the following for the /e:editorname argument.

/e:"Source Code (text) Editor"

As you enter a path, auto completion tries to locate the correct path and file name.

This example opens the style file "Test1.css" in the source code editor.

>File.OpenFile "C:\My Projects\project1\Test1.css" /e:"Source Code (text) Editor"
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker