UltraEdit and UEStudio support several command line parameters for launching the application from the Windows command prompt. By default, UltraEdit / UEStudio are added to your user %PATH% environment variable on install so that you can invoke the application from any directory. UltraEdit can be invoked from the command line by using either "uedit32" or "uedit64" for the 32-bit and 64-bit versions, respectively. UEStudio (both 32-bit and 64-bit) can be invoked from the command line by using "uestudio".
Command line calls should use the following format. All except for [appname] are optional.
[appname] [instance] [file path(s)][linenum/colnum] [options]
uedit32 |
launch UltraEdit (32-bit version) |
uedit64 |
launch UltraEdit (64-bit version) |
uestudio |
launch UEStudio (32-bit or 64-bit version) |
/fni |
Open in a new instance of the application |
/foi |
Open in the original (first) instance of the application. See Specifying new / original instance. |
(path) | Each file path should be separated by a space (use quotes for file paths containing spaces). Wildcards are supported. See Opening multiple files for more options and functionality. |
/f <path> |
Use the /f parameter to open a list of files within a separate text file. The file list path must immediately follow the /f parameter, separated by a space. See Opening multiple files for further documentation and examples. |
/<ln>/<cn> |
The line <ln> and column <cn> number to open the file to. Note that there must be no whitespace between the file path/name and the line and column number, if they are specified. |
-l<ln> -c<ln> |
Alternate syntax for the above; must immediately follow the file name, separated by a space. |
/p |
Prints file(s) opened by command line call and then exits the application. |
/m,e,<n>=<path>/<macro> |
Load a macro file at <path> and play <macro> <n> times. The ,e specifies that the application should exit after the macro is run. |
/s,e=<path> |
Play the script at <path>. The ,e specifies that the application should exit after the script is run. |
-f<string> |
Search for and select first occurrence of <string> immediately after opening file. |
/i=<path> |
Load and use the settings from the INI file at <path>. See Specifying a custom INI file for further documentation and examples. |
You can open a file in UltraEdit via the command line by entering the file path / name immediately after the application name. For example:
uedit64 d:\projects\juce\juce.h
You can open multiple files by:
uedit64 file1.txt file2.txt "some file with spaces.txt"
uedit64 d:\temp\*.c
uedit64 /f c:\temp\file_list.txt
You can open one or more files as read-only by adding the /r flag immediately following the file name(s).
When a file open in UltraEdit / UEStudio is deleted, the application will notify you that the file no longer exists and prompt you on what to do with the file. In some situations, it may be desirable to suppress this notification. To do this, add /n to the command line. This has no effect on files already opened, or files opened after this.
When launching UltraEdit / UEStudio from another application, it may be necessary to invoke it with a file that is already open to position at a specific line or column. In this case you can add /a to the command line, and if present, UltraEdit / UEStudio will not show the prompt to reload the file and lose unsaved changes.
You can specify the line and column number at which to position the caret when the file is opened. To do this, the line number and column number should follow the file name immediately separated from the file name by a / character. For example:
uedit64 d:\projects\juce\juce.h/5/2
The above opens the file "juce.h" with the caret positioned at line 5, column 2. You can specify the line number only if you'd like; in this case, the caret will be positioned at column 1 of the line number.
If you wish to use a different character for the line / column separator, you can add the following line to the INI file:
LineColumnChar=,
where the comma (,) may be any character except a colon (:). Keep in mind that UltraEdit will not be able to open a file that contains any special character you set for this.
You can also use -lx and / or -cx following the file name(s), where x is the line or column number. You can specify this individually after each file name. This method should be separated from the file name with a space, and if the file name is in quotes, it should be after the quotes with a space between this and the quotes. Example:
uedit64 file1.txt file2.txt -l10 -c25 "some file with spaces.txt" -l256 -c3
You can open a project in UltraEdit / UEStudio via the command line by using the same syntax for opening files. Project files (.prj), when opened in either UltraEdit or UEStudio, are automatically recognized and opened as projects rather than the files being opened themselves. Example:
uedit64 d:\projects\juce.prj
To print files, add /p to the command line. UltraEdit / UEStudio will automatically print all files opened and then exit after the print job is sent to the default printer.
Use the following flags before the file path(s) to specify whether a new instance should be launched for opening the files, or to use the original instance (regardless of the "Allow multiple instances" setting in Settings » Application layout » Miscellaneous:
Example:
uedit64 /fni file1.txt file2.txt
You can force UltraEdit / UEStudio to use a custom INI file so that the application can be launched with a different set of settings from your defaults by using the /i flag. Example:
uedit64 /i="C:\Path\To Custom\uedit64.ini"
The INI file does not need to exist in order for it to be created in the custom directory. The name of the custom INI is arbitrary, but the extension must always be ".ini".
You can run a macro in UltraEdit / UEStudio from the command line by using the /m flag. The full path to the macro (.mac) file must be specified in quotation marks. For example:
uedit64 C:\temp\file.txt /m,e,5="C:\Users\bschwenk\Documents\UltraEdit Macros.mac/cleanFile"
In the above example:
You can run a script in UltraEdit / UEStudio from the command line by using the /s flag. The full path to the script (.js) file must be specified in quotation marks. For example:
uedit64 C:\temp\file.txt /s,e="C:\Users\bschwenk\Documents\UltraEdit Scripts\cleanFile.js"
In the above example:
You can launch an automatic find on open from the command line by using the -f flag, immediately followed by the search string. This must be the last parameter on the command line in order to work. For added flexibility this parameter will use the settings specified for the last Find executed from within UltraEdit in regards to the "Match case," "Regular expressions," and other settings. Example:
uedit64 C:\temp\file.txt -fdog
This would open "file.txt" and search for and select the first occurrence of the string "dog" in the file.
If you wish to computer the CRC, MD5, SHA1 or SHA256 checksum on a file, you can do so with the following command line parameters:
uedit64 [/crc | /md5 | /sha1 | /sha256] c:\path\file_to_hash.exe
Example:
uedit64 /sha256 c:\temp\myBinary.exe
There is no file size limit for hash calculation, but keep in mind that larger files will require more computational resources. You can also compute the hash of the file or part of the file directly in the application. See Compute hash for more details.