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".
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.