Skip to content

File Operations

Working on files is much like working on text. You can encrypt, decrypt, sign, and verify them. The difference is where the result goes. For text, the result replaces the text in the tab. For a file, the result is saved as a new file. You do all of this in the File Panel.

There are two ways to open the File Panel.

Using the Open button:

  1. In the main window toolbar, click Open. Or open the File menu and choose Open.
  2. Choose File… to pick one file, or Directory… to pick a folder.
  3. Pick the file or folder you want.
  4. The File Panel opens. If you picked a file, it is highlighted and ready. If you picked a folder, you see its contents and can choose files inside.

Using the Workspace button:

  1. In the main window toolbar, click Workspace. Or open the File menu and choose Workspace.
  2. Choose New File Panel. The shortcut is Ctrl+B.
  3. A new File Panel tab opens. Click the file you want.

The new panel opens at the folder set in Settings, General, File Panel Opens At:. You can pick Profile Workspace, Home Folder or Working Directory there. The default is Home Folder. Profile Workspace is only offered when your profile has a workspace folder.

The Flatpak and Mac App Store builds hide that setting. In those builds, a window called Select Default Path asks you to pick a folder each time you open a new File Panel.

The path bar across the top shows the folder you are in, one step at a time. Click any step to jump straight to it. There is a Home step at the start.

To type a path instead, click the edit button at the end of the path bar, or press Ctrl+L. When the path bar has the keyboard focus, F6 does the same. You can use ~ for your home folder.

The small buttons next to the path bar have icons only. Point at one to see its tooltip:

  • Go to the parent folder (Backspace): go to the folder above. The Backspace key does the same.
  • Read this folder from disk again: refresh the list.
  • Go to a mounted volume or removable drive: jump to a USB drive, another disk, or your Profile Workspace.
  • Create items and choose what the list shows: opens the options menu. It holds:
    • New Folder and New Empty File, to make something in the folder you are in.
    • Show, a submenu where you choose what the list shows: Hidden Files, System Files and Type Column.
    • Use ASCII Armor. See Choose ASCII or Binary Output.
  • Enable batch mode to select multiple files.: see Batch Mode.

The Filter box lists only the files and folders whose name contains the text you type.

Along the bottom you can see how many items are in the folder, how many you have selected, and how much space is left on the disk.

To delete a file or folder, right-click it and choose Move to Trash, or press Delete. GpgFrontend asks you to confirm first.

Right-click an item in the File Panel to see what you can do with it:

  • Open: open the file in a GpgFrontend tab. Enter does the same.
  • Open with Default Application: open the item in the app your system uses for it.
  • New: make an Empty File or a Folder. See Make or Rename Files and Folders.
  • Rename: give the item a new name. F2 does the same.
  • Move to Trash: move the item to your system’s Trash, where you can still get it back.
  • Copy Path: copy the full path of the item to the clipboard.
  • Refresh: read the folder from disk again.
  • Calculate Hash: work out checksums of the file and show them in the Status Panel. Use them to check that a download is complete and unchanged.
  1. Click the options button (Create items and choose what the list shows), then New Folder or New Empty File. Or right-click in the list and choose New, then Folder or Empty File.
  2. A window called New Folder or New File opens. It shows the Location: where the item will be made.
  3. Type the name in Name:.
  4. Click Create.
  1. Click the item, then press F2. Or right-click it and choose Rename.
  2. A window called Rename File or Rename Folder opens.
  3. Type the new name in Name:.
  4. Click Rename.

The window checks the name as you type. The Create or Rename button stays greyed out, and a short message says why:

  • Enter a folder name. or Enter a file name.: the box is empty.
  • The name must not contain path separators.: remove any / or \.
  • This name is reserved. or This name is reserved by the operating system.: pick another name.
  • Enter a name different from the current one.: when renaming, the name is still the same.
  • A file or folder with this name already exists.: pick another name.

If the name is fine but the item still cannot be made or renamed, for example because you are not allowed to write to that folder, a message says so. Its title is Unable to Create Folder, Unable to Create File or Unable to Rename.

The buttons are the same as for text: Encrypt, Decrypt, Sign and Verify on the toolbar, or the same items in the Operations menu. They act on the file you selected in the File Panel. See Find the Buttons for the full list and shortcuts.

GpgFrontend never changes your original file. It always writes a new file next to it, in the same folder. The new file’s name tells you what it is:

Task You select New file made Example
Encrypt report.pdf name + .gpg report.pdf.gpg
Sign report.pdf name + .sig report.pdf.sig
Decrypt report.pdf.gpg name without .gpg report.pdf
Verify report.pdf.sig nothing, only a result

If you turned on ASCII output, encrypting and signing make .asc files instead. See Choose ASCII or Binary Output.

Each button only works on certain items. If a button is greyed out, check what you selected:

  • Encrypt, Encrypt & Sign and Sym. Encrypt: files and folders. Not files that end in .gpg, .pgp, .asc or .sig.
  • Decrypt and Decrypt & Verify: files that end in .gpg, .pgp or .asc. Not folders.
  • Sign: files. Not folders, and not files that end in .gpg, .pgp, .asc or .sig.
  • Verify: files that end in .gpg, .pgp, .asc or .sig.

In Batch Mode, a button only works when every selected item fits its rule.

If a file with the new name is already there, GpgFrontend asks before it replaces that file. See If an Operation Is Interrupted.

You need the recipient’s public key.

  1. Select the file. In the File Panel, click the file once so it is highlighted.
  2. Pick the recipient. In the Key ToolBox on the right, tick the box in front of the recipient’s public key. Tick your own key too if you want to open the file later yourself.
  3. Click Encrypt.
  4. Answer any questions. GpgFrontend may stop to check your recipients. See Encryption Safety.
  5. Find the new file. It appears in the same folder, for example report.pdf.gpg. The Status Panel shows whether it worked.
  6. Send the new file, not the original.

You need your private key.

  1. Select the encrypted file in the File Panel, for example report.pdf.gpg.
  2. Click Decrypt. You do not need to tick a key. GpgFrontend finds the right one.
  3. Enter your passphrase when asked.
  4. Find the new file. It appears in the same folder, with .gpg, .pgp or .asc taken off the end: report.pdf.

If the file was also signed, use Decrypt & Verify from the Operations menu to check the signature at the same time. If you added it to the toolbar, it is also in the Decrypt button’s list.

Signing makes a small, separate signature file. The original file stays as it is. You send both files together. You need your private key.

  1. Select the file in the File Panel.
  2. Pick your key. In the Key ToolBox, tick the box in front of your own key. If you tick no key, or a key that can’t sign, Sign is greyed out.
  3. Click Sign.
  4. Choose a key, if asked. If your key has more than one signing subkey that still works (not revoked or expired), a window called Select Signing Key(s) opens. Tick the key or subkey to use and click Confirm.
  5. Enter your passphrase when asked.
  6. Find the signature file. It appears next to the original, for example report.pdf.sig.
  7. Send both files: report.pdf and report.pdf.sig. Keep their names as they are.

You need the sender’s public key, and both files: the original and its signature.

  1. Put both files in the same folder, with their names unchanged, for example report.pdf and report.pdf.sig.
  2. Select the signature file (report.pdf.sig or report.pdf.asc) in the File Panel. Select the signature, not the original.
  3. Click Verify. You do not need to tick a key.
  4. Read the result in the Status Panel. Green means the file is unchanged and was signed by the key shown. Red means the file was changed, or the signature does not match.

GpgFrontend finds the original by taking .sig or .asc off the signature’s name. If it cannot find that file, a window called File to be Verified asks for the full path of the original:

  • Type or paste the full path to the original file and click OK.
  • Leave the box empty and click OK if the file you selected holds the data and the signature together in one file.

If you select a .gpg or .pgp file, GpgFrontend treats it as one file that holds both the data and the signature.

If the sender’s public key is missing, the Missing Keys window opens. See If the Sender’s Key Is Missing.

You can drag files with the mouse and drop them in the File Panel. This is a quick way to copy files into the folder you are working in, or to move them to another folder.

Where an item lands depends on what is under the cursor when you let go:

  • Drop onto a folder to place the items inside that folder.
  • Drop onto a file to place the items in that file’s parent folder.
  • Drop onto empty space to place the items in the folder shown in the panel.

The target folder must be one you can write to. If it is not, a Copy Failed or Move Failed message says The target folder is not writable.

Drag one or more files or folders from your system’s file manager (Finder, Windows Explorer, or your Linux file manager) and drop them onto the File Panel. The items are copied. The originals stay where they were.

Drag files or folders from one spot in the File Panel and drop them onto a different folder in the same panel. The items are moved to that folder.

Before it moves or copies anything, GpgFrontend asks you to confirm. The question shows the name of the item (or how many items there are) and the target folder. A few checks stop common mistakes:

  • Dropping items back into their own folder does nothing. The status bar says The source and target folder are the same.
  • A folder can’t be moved or copied into itself or one of its own subfolders. The status bar says so.
  • If an item with the same name already exists in the target folder, it is never replaced. When you move items, a Move Failed message names the item. When you copy items, the other items are still copied. Then one message called Copy Partially Completed lists every item that was not copied, and why.

After the drop, the panel reads the folder again and selects the new or moved items. The status bar says how many items were copied or moved.

By default the File Panel works on one file at a time. Turn on Batch Mode to work on several files at once.

  1. Click the batch mode button, the segmented icon at the top-right of the File Panel toolbar. Its tooltip says Enable batch mode to select multiple files. Once it is on, the tooltip says Batch mode is enabled. Multiple files can be selected.
  2. Select several files with Ctrl+Click or Shift+Click.
  3. Click Encrypt, Decrypt, Sign, or Verify. GpgFrontend does the task on every selected file.

Two selected files may lead to the same new file name. For example, notes.gpg and notes.asc would both decrypt to notes. Then an Error message lists them, and nothing is done. Process those files one at a time.

GpgFrontend can encrypt a whole folder into one file, and turn that file back into the folder later. The files and subfolders inside keep their names and places.

Select the folder in the File Panel instead of a file, then encrypt it the same way as a file. GpgFrontend does two things:

  1. It packs the folder into one archive (a .tar file) that holds all its files and subfolders. GpgFrontend does this itself. You don’t need a separate tar program.
  2. It encrypts that archive. You get a .tar.gpg file (binary) or a .tar.asc file (ASCII), depending on your output format. For example, a folder called photos becomes photos.tar.gpg.

The result is one file that holds the whole folder, ready to store or send. If you know the gpg-zip tool, this works the same way.

Select the .tar.gpg or .tar.asc file and decrypt it the same way as any other file. GpgFrontend does two things:

  1. It decrypts the file back into the .tar archive.
  2. It unpacks that archive into a folder next to the encrypted file, with the same files and subfolders as the original. The folder gets the name without the endings: photos.tar.gpg becomes the folder photos.

You don’t need to unpack anything by hand.

A file that ends in .tar.pgp is not unpacked. Decrypting it gives you a plain .tar archive, which you can unpack with another program.

If a folder with that name is already there, GpgFrontend asks first. If you go on, your existing folder is not deleted. It is renamed to photos.bak and kept next to the new one. If photos.bak is taken too, the name is photos.bak-2, then photos.bak-3, and so on.

The ending of a file name tells you what kind of file it is:

  • .asc: ASCII output, also called ASCII-armored. The file holds only normal text characters. It can be encrypted data or a signature.
  • .gpg: binary output. The file is encrypted, or encrypted and signed. It is smaller than an ASCII file.
  • .sig: a binary signature file. It holds a signature only.

GpgFrontend saves files in binary by default (since version 2.0.4; older versions used ASCII). Binary files are smaller. Choose ASCII when you need a file that holds only normal text, for example to paste into an email.

Change it in Settings:

  1. Open Settings and go to the General section.
  2. Find the option Use Binary Mode for File Operations.
  3. Check it for binary (.gpg / .sig), or uncheck it for ASCII (.asc).

Or change it for one File Panel:

  1. In the File Panel toolbar, click the options button. Its tooltip says Create items and choose what the list shows.
  2. Tick Use ASCII Armor. You then get .asc files instead of .gpg or .sig.

This is faster than opening Settings. It changes only the File Panel tab you are in, and it is not saved. A new File Panel tab starts with the choice from Settings.

You can encrypt and decrypt large files with either engine. The rPGP engine reads a file piece by piece. So the whole file never has to fit in memory at once.

Since v2.2.2, GpgFrontend writes its result to a temporary file first. It only moves the result to its final place once the whole task has worked.

  • If a task fails or is interrupted, you get no new file. You never get a half-written one next to your original.
  • If a file with the new name already exists, GpgFrontend asks before it continues. The old file is only replaced after the task has worked.
  • Your original file is never changed.