Personal Notes File


Execute ▶ Command

Purpose

The Execute ▶ command is used to run an external Windows or Linux program from within NOTEFILE.

Note: To use this feature, you need to have the Enable command execution option enabled. By default this option is enabled, so you can run commands. But, for security reasons you may wish to disable this option. This can be done by using the Setup... command from the File menu.

To execute a command

  1. Position the insertion point at a string containing a command in your notes file or select the entire command and its parameters (if any). Please do not select a string that spans multiple lines.
  2. From the Card menu, choose Execute ▶.
  3. From the Execute submenu, select the displayed command and it will be executed. If you have not selected a command and there are spaces or end-of-line characters around the insertion point, then <Nothing> will be displayed and nothing will be executed.

Some example commands are given below. Execution depends on your Windows or Linux configuration and the programs installed on your computer. Note that, if you do not select any text, an automatic selection around the insertion point, not including spaces and end-of-line characters will be made.

  1. https://notefile.kadifeli.com/
  2. mailto:test@example.com?subject=Testing&body=Your_message&bcc=bcc@example.com&cc=cc@example.com
  3. telnet://time-a.nist.gov:13/
  4. ftp://ftp.dlptest.com/
  5. C:\windows
  6. notepad C:\Windows\System.ini
  7. readme.txt
  8. eventvwr.msc
  9. \\filesrv\share1

The first four commands will try to access some URLs on the Internet. These are actually Internet protocols that your operating system recognizes. Note that telnet and ftp are obsolete protocols and your system may not recognize them. Alternatively, in Linux, depending on which terminal emulator is available, the third line may be replaced with something like this:

  1. gnome-terminal -- telnet time-a.nist.gov 13
    or
    gnome-terminal -- netcat time-a.nist.gov 13
    or
    ptyxis -- telnet time-a.nist.gov 13
    or
    ptyxis -- netcat time-a.nist.gov 13

The fifth command will open Windows explorer for the given directory (if this directory is present). The sixth command will run the NOTEPAD.EXE program if it is present. If you select the parameter C:\Windows\System.ini together with the command notepad, then it will be given as a parameter to the notepad command. The seventh command will try to open the readme.txt file from the current directory with the system’s default text editor. The eighth command will run Windows Event Viewer. The ninth command will try to browse a directory on another server on your local area network.

In a Linux (GNOME) environment, the following similar commands to the above may be used:

  1. nautilus /usr
    or just
    /usr
  2. gedit /etc/os-release
    or
    gnome-text-editor /etc/os-release
  3. readme.txt (assuming this file is present in the current directory)
  4. gnome-logs
  5. smb://filesrv/share1

Other usage examples:

  1. man:ls (only Linux)
  2. tel:555-1234567

Keyboard shortcut

F9

Error messages

Error running: ... Some system error message

When the command you are trying to execute cannot be run by the operating system, you will get this error message. The last line of the message may give you a clue of what the real problem is.

On Linux, you may not get any error message at all. For error or information messages, please look at NOTEFILE’s stderr output if it was started from the command line; otherwise check the output of the journalctl -f command.