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 creates a blank tab with that file name. The file itself is not created until you save it. You can use wildcards such as *.txt to make EditPad open all files that match the wildcard. You can use paths relative to the current directory.
Example: EditPadPro8.exe "C:\My Documents\text.txt" C:\Development\source.c
If you start EditPad while another copy of EditPad is already running then the newly run copy sends the command line parameters to the existing copy. The newly run copy closes 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. It 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 you can specify the /newinstance parameter to start a new EditPad instance that the application can wait for. Alternatively, you can 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.
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 does 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. Negative numbers count from the end of the file. /l-1 (slash el minus one) places the text cursor at the very end of the file.
/c45 tells EditPad to place the text cursor at byte offset 45 in the file. Byte offset 0 is at the first character in the file. If the file is opened in text mode and the file has a byte order marker then the byte order marker is not included in the count.
If you use /c in combination with /l, then the meaning of /c changes. /c7 places the text cursor at the 7th column on the line indicated by /l. The first column on the line is number 1.
Finally, /s123-145 selects bytes 123 through 144 (inclusive) and places the text cursor at byte offset 145. You can select ranges in reverse. /s145-123 also selects bytes 123 through 144 (inclusive) but places the cursor at byte offset 123. The high number in the range (145 in the examples) is always exclusive.
In combination with /l, /s4-7 select columns 4 through 6 and puts the text cursor on the 7th column on the line indicated by /l.
/c and /s cannot be used in combination with each other. If you specify /s then /c is ignored.
Some text file encodings use multiple bytes per character. The cursor cannot be placed between bytes that are part of the same character. Selections must include either none or all of the bytes that a character consist of. If you specify a byte offset in the middle of a character using /c or /s then EditPad places the cursor or ends the selection at the nearest valid byte offset between two characters.
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.
/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.
/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.
/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. You can suppress the dialog with /masks followed by a file mask. EditPad Pro then automatically opens all files in the folder that match the file mask. Specify /masks *.* to open all files in the folder. You can pass /recurse to include subfolders. You can pass /closed to add the files to the project without opening them. The /newproject and /readonly parameters also affect files opened from a folder.
You can pass the path to an .epp project file on the command line just like any other file. EditPad Pro recognizes .epp files as project files and opens them as a project. Command line parameters such as /hex or /readonly that determine how files are opened on the command line are not applied to files opened as part of a project. They are not applied to the project itself either.