Opening and Saving Files

T.C. Hollingsworth

Introduction

Many KDE applications work with files. Most applications have a File menu with options that allow you to open and save files. For more information on that, see the section called “The File Menu”. However, there are lots of different operations that require selecting a file. Regardless of the method, all KDE applications generally use the same file selection window.

The File Open window.

Opening a file in Konqueror.

The File Selection Window

The Toolbar

This contains standard navigation tool buttons:

Back

Causes the folder view to change to the previously displayed folder in its history. This button is disabled, if there is no previous item.

Forward

Causes the folder view to change to the next folder in its history. This button is disabled, if there is no next folder.

Parent Folder

This will cause the folder view to change to the immediate parent of the currently displayed folder, if possible.

Reload (F5)

Reloads the folder view, displaying any changes that have been made since it was first loaded or last reloaded.

Show Preview

Displays a preview of each file inside the folder view.

Zoom Slider

This allows you to change the size of the icon or preview shown in the folder view.

Options
OptionsSorting
OptionsSortingBy Name

Sort files listed in the folder view alphabetically by name.

OptionsSortingBy Size

Sort files listed in the folder view in order of their file size.

OptionsSortingBy Date

Sort files listed in the folder view by the date they were last modified.

OptionsSortingBy Type

Sort files listed in the folder view alphabetically by their file type.

OptionsSortingDescending

When unchecked (the default), files in the folder view will be sorted in ascending order. (For instance, files sorted alphabetically will be sorted from A to Z, while files sorted numerically will be sorted from smallest to largest.) When checked, files in the folder will be sorted in descending order (in reverse).

OptionsSortingFolders First

When enabled (the default), folders will appear before regular files.

OptionsView
OptionsViewShort View

Displays only the filenames.

OptionsViewDetailed View

Displays Name, Date and Size of the files.

OptionsViewTree View

Like Short View, but folders can be expanded to view their contents.

OptionsViewDetailed Tree View

This also allows folders to be expanded, but displays the additional columns available in Detailed View.

OptionsShow Hidden Files (Alt+.)

Displays files or folders normally hidden by your operating system. The alternate shortcut for this action is F8.

OptionsShow Places Navigation Panel (F9)

Displays the places panel which provides quick access to bookmarked locations and disks or other media.

OptionsShow Bookmarks

Displays an additional icon on the toolbar that provides access to bookmarks, a list of saved locations.

OptionsShow Aside Preview

Displays a preview of the currently highlighted file to the right of the folder view.

Bookmarks

Opens a submenu to edit or add bookmarks and to add a new bookmark folder.

Location Bar

The location bar, which can be found on top of the folder view, displays the path to the current folder. The location bar has two modes:

Bread Crumb Mode

In the bread crumb mode, which is the default, each folder name in the path to the current folder is a button which can be clicked to quickly open that folder. Moreover, clicking the > sign to the right of a folder opens a menu which permits to quickly open a subfolder of that folder.

Location bar in bread crumb mode.

Location bar in bread crumb mode.

Editable Mode

When in bread crumb mode, clicking in the gray area to the right of the path with the left mouse button switches the location bar to the editable mode, in which the path can be edited using the keyboard. To switch back to bread crumb mode, click the check mark at the right of the location bar with the left mouse button.

Location bar in editable mode.

Location bar in editable mode.

The context menu of the location bar offers action to switch between the modes and to copy and paste the path using the clipboard. Check the last option in this context menu to display either the full path starting with the root folder of the file system or to display the path starting with the current places entry.

Location bar context menu
The Places List

This provides the standard KDE list of Places, shared with Dolphin and other file management tools.

The Folder View

The largest part of the file selection window is the area that lists all items in the current directory. To select a file, you can double-click on it, or choose one and hit Open or Save.

You can also select multiple files at once. To select specific files, or to unselect specific files that are already selected, press and hold Ctrl, click on each file, then release Ctrl. To select a contiguous group of files, click the first file, press and hold Shift, click on the last file in the group, and release Shift.

The Folder View supports a limited set of file operations, which can be accessed by right-clicking on a file to access its context menu, or using keyboard shortcuts. The following items are available in the context menu:

Create New...

Create a new file or folder.

Move to Trash... (Del)

Move the currently selected item to the trash.

Sorting

This submenu can also be accessed from the toolbar, and is described in OptionsSorting.

View

This submenu can also be accessed from the toolbar, and is described in OptionsView.

Open File Manager

Opens the current folder in your default file manager application.

Properties (Alt+Enter)

Open the Properties window that allows you to view and modify various types of metadata related to the currently selected file.

The Preview Pane

If enabled, this displays a preview of the currently highlighted file.

The Name Entry

When a file is selected, a name will appear in this text box. You may also manually enter a file name or path in this text box.

The Filter Entry

When opening a file, the Filter entry allows you to enter a filter for the files displayed in the folder view. The filter uses standard globs; patterns must be separated by white space. For instance, you can enter *.cpp *.h *.moc to display several different common Qt™ programming files.

To display all files, enter a single asterisk (*).

The filter entry saves the last 10 filters entered between sessions. To use one, press the arrow button on the right of the entry and select the desired filter string. You can disable the filter by pressing the Clear text button to the left of the autocompletion arrow button.

When saving a file, the Filter entry will instead display a drop down box that allows you to select from all the file types the application supports. Select one to save a file in that format.

Automatically select filename extension

When saving a file, this check box will appear. When selected (the default), the application will automatically append the default file extension for the selected file type to the end of the file name, if it does not already appear in the Name entry. The file extension that will be used is listed in parenthesis at the end of the check box label.

The File Save window.

Saving a file in Konqueror.

The Open or Save Button

Depending on the action being performed, an Open or Save button will be displayed. Clicking on this button will close the file selection window and perform the requested action.

The Cancel Button

Clicking Cancel will close the file dialog without performing any action.

Thanks and Acknowledgments

Special thanks to Google Code-In 2011 participant Alexey Subach for writing parts of this section.