010 Editor - Text/Hex Editor Homepage


Opening Files

A set of files to load can be specified on the command line when starting 010 Editor. Each file to load should be separated by a space. For example, to load two files use:

     010editor file1.dat file2.dat

Multiple files can be loaded on the command line by using the wildcards '*' and '?'. For example:

     010editor *.bin file???.dat

By default, when 010 Editor is installed it is placed in the system path. This means that 010 Editor can be run from any command line by entering '010editor' (no directory needs to be specified). To not place 010 Editor in the path, disable the ' Add 010 Editor to the system path' toggle in the install program.

Opening Drives

Drives can be opened from the command line by using the -drive: command, followed by either a drive letter or a drive number. If a drive letter is specified, a logical drive is opened and if a drive number is specified, a physical drive is specified (see Editing Drives for more information). For example:

     010editor -drive:C -drive:1 

would open logical drive C: and physical drive 1.

Opening Processes

Processes can be opened using the -process: command, followed by either a process identification number or a name of a process. For more information on working with processes, see the Editing Processes help topic. For example, to open two processes from the command line use:

     010editor -process:cmd.exe -process:1074 

Importing Files

To import any of the available file formats, use the -import: command, followed by the file to load. Any of the accepted import or export types are accepted and the type used will be based from the file extension (see Importing/Exporting Files for more information). For example, to import a C file use:

     010editor -import:array.c

The wildcard characters '*' and '?' can also be used to import multiple files at the same time.

Position the Cursor and Selections

The cursor can automatically be positioned when a file, drive, or process is loaded, or when a file is imported using -import. Append the character '@' followed by a numeric address to the file name. Note that any of the standard numeric formats are accepted. For example, to load a file and position the cursor at address 256 use:

     010editor file1.dat@0x100

Additionally, a selection can be made when opening a file by appending a second '@' and size after the position above. For example, to open a file and drive C with the cursor at position 16 and the next 4 bytes selected use:

     010editor file1.dat@16@4 -drive:C@16@4

Opening Scripts or Templates

Scripts or Templates can be run from the command line using the -script: or -template: command respectively. See Introduction to Templates and Scripts for more information on Templates and Scripts. To run the script IsASCII for example, use:

     010editor -script:IsASCII.1sc

The file to run must exist in either the current directory, the current 'Scripts' directory if running a script, or the current 'Templates' directory if running a template (these directories can be modified in the Compiling Options). To open the Script or Template in the interface without running the file, specify a '@' symbol and a line number after the filename. For example, to open the ZIPTemplate.bt file and position the cursor on the 3rd line, use:

     010editor -template:ZIPTemplate.bt@3

Saving and Closing Files

The current open file can be saved to disk by using the -save command. To save a file to a different file name, use the command -save:<filename>. For example:

     010editor temp.txt -save:temp.txt.bak

To close the current file, use the -close command.

Replacing Strings or Bytes

A string or a set of bytes can be replaced from the command line using the -replace:<find_value>:<replace_value> command. For example:

     010editor temp.txt -replace:apple:orange

would replace all occurrences of apple with orange in the file temp.txt. Note that if there are spaces in any of the replace strings, surround the whole -replace command with double quotes. The replacement options can be controlled, and special characters can be inserted into strings through the use of escape codes which start with the character '\'. The following special escape codes can be used:

\m = match case
\w = match whole word
\p = pad with zeros
\* = search with wildcards
\\ = insert a '\' character
\: = insert a colon
\' = insert double quotes "

For example, to replace the string 'first' with 'second' using the match case and whole word options, use:

     010editor -replace:first:second\m\w

Comparing Files

Two files can be compared from the command line using the -compare:<fileA>::<fileB> or the -compare:<fileA>::<fileB>::<options> command. For example:

     010editor -compare:c:\01.dat::c:\02.dat

would run a regular binary comparison on the two given files. Notice the double-colon '::' between the file names and if there are spaces in either file name, surround the whole -compare command with double quotes. To specify options for the comparison, use another double-colon '::' after the second file name and specify one or more of the following special escape codes (note that 'XXX' indicates a number):

\b = byte by byte comparison
\i = ignore case
\e = enable synchronized scrolling
\xXXX = max look-a-head
\nXXX = min match length
\qXXX = quick match length
\saXXX = limit start for file A
\sbXXX = limit start for file B
\zaXXX = limit size for file A
\zbXXX = limit size for file B

For example, to compare two files and ignore the case, use:

     010editor -compare:c:\01.dat::c:\02.dat::\i
or to limit the comparison to the first 16 bytes of each file, use:

     010editor -compare:c:\01.dat::c:\02.dat::\i\za16\zb16

See Comparing Files for an explanation of the different options for comparisons. Note that if a Max Look-a-head, Min Match Length, or Quick Match is not specified the values from the last time the Compare dialog was run will be used. Running '010editor -compare:' will give a list of all comparison options.

Running 010 Editor in Batch Files

If running 010 Editor from a batch file, it is possible to pass error level codes from a script or template back to the batch file. First, in a script or template call the function Exit with an error code (e.g. 'Exit(-5);'). Next, in a batch file start 010 Editor by using the syntax 'start /wait 010editor ...'. Afterwards the error code can be accessed in the batch file using the variable %ERRORLEVEL%. For example:

     start /wait 010editor test.txt -template:test.bt -exit
     echo %ERRORLEVEL%

Running 010 Editor without a User Interface

When running 010 Editor from the command line, the software can be executed without a user interface by specifying the -noui command. In this mode, the splash screen and main window of 010 Editor are not displayed and the program will exit automatically when all the command line options are executed. Note that in this mode, messages boxes may still be displayed on error messages and this may stop program execution until the message box is cleared by the user. To disable the display of any message boxes, include the -nowarnings option on the command line. The -noui command line option is very useful when running 010 Editor from a batch file (see above).

Resetting the Application

Options for 010 Editor can be reset by using the command line. Specify the -reset command on startup to reset just the docking panel positions. Specify -resetall to revert all application settings to their defaults. If 010 Editor will not startup, specifying -reset or -resetall will usually fix the problem.

Exiting the Application

Use the -exit command to shut down 010 Editor from the command line (all unsaved modifications will be lost). Alternately the -exitnoerrors command can be used to shut down 010 Editor only if no errors occurred. Here an error is defined to be a Script or Template that did not compile or execute properly, or a Script or Template that was halted using the Exit function with a negative error code.

Other Command Line Parameters

The -readonly command can be used to set the last opened file, drive, or process to Read Only. The -h command will display a short help screen on using the command line parameters.

This is the manual for 010 Editor, a professional hex editor and binary file editor. Use 010 Editor to edit the individual bytes of any binary file, hard drive, or process on your machine. 010 Editor contains a whole host of powerful analysis and editing tools, plus Binary Templates technology that allows any binary format to be understood.







SweetScape Software
148 Pownal Rd. RR#1
Pownal, PEI
C0A 1Z0, Canada

E-mail: