Command Line Parameters

You can specify as many files as you want on the command line. EditPad will open all files. You should put double quotes around file names that contain spaces. Putting double quotes around file names without spaces makes no difference. If you specify a file that does not exist on the command line, EditPad will create a blank tab with that file name. The file itself will not be created until you save it.

Example: EditPadPro7.exe "C:\My Documents\text.txt" C:\Development\source.c

If you start EditPad while another copy of EditPad is already running, the newly run copy will send the command line parameters to the existing copy. The newly run copy will close itself as soon as the existing copy has processed the command line parameters and opened all files.

If you want to force a second EditPad window to appear, specify the /newinstance parameter on the command line. This parameter can appear anywhere on the command line, and can be used in combination with any other command line parameter.

When using /newinstance, you can also specify the location of the new EditPad window. /brl100t200r300b400 sets the window's bounding rectangle to left 100, top 200, right 300 and bottom 400, counting pixels from the top left corner of the screen.

Some applications that launch a text editor wait for the editor to close as a signal that you're done editing the file and that the application can proceed with whatever it was doing. Such applications won't behave correctly when EditPad reuses an existing instance and then closes as soon as the file has been opened. To avoid this problem, either specify the /newinstance parameter to start a new EditPad instance that the application can wait for. Or, specify the /wait parameter to reuse the existing window as usual, but to make the newly run copy wait until you have closed the file in the existing instance. While waiting, the newly run instance appears as a separate process in the task manager, but is otherwise invisible.

Parameters Specific to One File

All of the parameters in this section require a single file to be specified on the command line. Each of them can appear only once on the command line. EditPad will not show any error messages if you do not respect these rules, but the result will not be what you expected. The order of the parameters does not matter.

/p tells EditPad to show the print preview immediately after opening the file, so you can print it with one click.

/l123 (slash el one two three) tells EditPad to place the text cursor on line 123 of the file. The first line in the file is number one. The lines are counted as if word wrap were off. /l-1 (slash el minus one) will place the text cursor at the very end of the file.

/c45 tells EditPad to place the text cursor on character 45 of the file, counting characters from the start of the file. The first character is number zero.

If you use /c in combination with /l, then the meaning of /c changes. /c7 will then place the text cursor on the 7th character on the line indicated by /l, counting only characters on that line, rather than counting all characters from the beginning of the file. The first character on the line is number one.

Finally, /s123-145 will select characters 123 through 144, and place the text cursor at character 145. Like /c, /s counts characters from the start of the file, with the first character being number zero.

In combination with /l, /s4-7 will select columns 4 through 6, and put the text cursor on the 7th column on the line indicated by /l. Again, the first character on the line is number one. /c and /s cannot be used in combination with each other.

Additional EditPad Pro Parameters

The parameters described above are supported by both EditPad Lite and Pro. EditPad Pro supports several additional parameters.

/newproject tells EditPad Pro to use Project|New Project to start with a new project to open all the files specified on the command line. This parameter only makes a difference when reusing an existing instance that already has open files.

/newprojectcombine does the same as /newproject, except that /newprojectcombine is ignored if another file was opened with this parameter less than one second ago. If you have an application or script that launches multiple EditPad Pro instances at the same time to open multiple files at the same time, the result of the /newprojectcombine parameter is that all those files will be opened into one new project.

/folder followed by a separate parameter with the full path to a folder makes EditPad Pro show the Project|Open Folder window with that folder preselected.

/import shows the Project|Import File Listing screen. All the files specified on the command line are treated as file listings to be imported rather than as files to be opened.

/hex tells EditPad Pro to open the files specified on the command line in hexadecimal mode, regardless of whether you set this option in the file type configuration or not.

/readonly tells EditPad Pro to open the files specified on the command line in read-only mode. Use this parameter if you want to make sure you don't accidentally modify the files in EditPad Pro. You can click the read-only indicator on the statusbar to turn off read-only mode later.