# Opening and Saving files:

## Opening files

Opening goes very similar to any other windows application.

- To open a file, simply go to File->Open or press . A dialog will appear and you can select one or more files that have to be opened. Each file will be opened in an individual tab. If the file was already opened, Notepad++ will show you that file in its current state. In the dialog, at the bottom there is a filter that will allow you to only show the files that belong to a certain language (such as C++ or PHP) depending on the extension. By default all files are shown. If you attempt to open more than 200 files, Notepad++ will issue a warning, in case the massive action was not intended.
- Another way to open a file is to drag the file into Notepad++ using the cursor. This can also be done with multiple files selected or whole folders.
- Additionally, Notepad++ keeps a list of unopened, recently closed files in the File menu so you can reopen them quickly. Simply click on the filename to open it (see the section about Recent file list for more details). To open all the files in that list, simply select File->Open All Recent Files (selecting File->Clean Recent Files List will clear that list). If the list is folded into a submenu, these commands are on this very submenu as well.
- See also the section about the Command Line to see how to open files using the command line.

## Saving files

Saving a file can be done in multiple ways.

- The default way is to select File->Save or press . If it is an existing file it will be overwritten with the current contents. Note that if the file has not been modified, you cannot save the file.
- If you want to save all the files you have opened at once, you can select File->Save All or press .
- If the file has no name yet (for example, if you had created a new file), or you selected File->Save As, the save file dialog will pop up, asking you for the name of the file. You can then choose the location and the name of the file. A .txt extension is assumed if the file name has no extension (add a trailing period to avoid this).
- An useful variant is File->Save a Copy As. The difference with File->Save As is that, after the latter, your work continues on the new file, while with the former it continues on the old file.
- The filter at the bottom of the dialog can automatically add or change the extension for you. Depending in the first extension listed for that language, the filename will be changed to have that extension.

## Backups

Backups are optional, and come in two flavours:

- When saving a file, you can ask Notepad++ to keep a copy of saved file. The copy has an optional timestamp, and may be stored in a custom directory rather than along the saved file.
- If Enable session snapshots and periodic backups is ticked, backups of all open files in their current unsaved state, plus the session, will be backed up at regular intervals, the length of which is configurable. This can lead to your file on disk showing the last saved state only, while a more recent snapshot is stored elsewhere and shown in editor when reopening Notepad++. This s specially useful if the program closed accidentally, but can be confusing if you work with other tools than Notepad++ on the same file. There is no prompt about unsaved files when closing Notepad++; rely on the state icons on the tab bar.

All options controlling what kind of backup is on and configuring backup are on the backup tab in the Preferences dialog box

## Other related operations

You can File->Reload from Disk a file if you wish to update the current view of the file (for example, if the file has been modified) or restore its contents to what is on disk if you have modified the file but not yet saved. If the file has been changed on disk, by default Notepad++ will ask you if you wish to reload it (see Preferences for more details).

Finally, you can choose to Rename a file by selecting File->Rename. A dialog will pop up asking you for the new name of the file, similar to the Save As dialog. However, the original file will be deleted.

## The project manager

The tool, which shows as a dockable window, allows the tree-like display of sets of files, from which files can be opened one by one into the main view. Such windows open with View -> Project -> Project panel n where n is 1, 2 or 3. Under the root named Workspace projects may appear, comprised of folders and files.

Each item has a context menu. The one for the workspace is also available from WorkSpace, and from Edit for the other items.

### The workspace

Each workspace is backed by a file describing its contents, like a session. Thus, one can:

- Clear workspace
- Open workspace from a file
- Reload worksspace from current file (to squash undesirable edits)
- Save workspace
- Save As a different file, and make it current
- Save a copy in a different file, without making it current
- Add new project

The Enter key, like a double click or clicking on the folding symbol if present, toggles the fold state for the item.

Inside the workspace, any items can be dragged anywhere when it makes sense - dragging a project inside a folder doesn't. Further, items inside a container can be moved up or down by selecting the item and using Ctrl-Up or Ctrl-Down.

### Projects

They can be renamed or removed from the context menu. One can add files or folders to it. You also can change the name by clicking the label, just like in Windows' explorer. The Delete key performs a removal too.

The Add files from Directory... command lets you select a folder. On choosing some, all of its files are added to the project, and all of its subfolders are added as project folders.

### Folders

The same commands are available. A folder is just a container, without any relation with existing folders o your file system, even when added as subfolders from a Add files from Directory... command.

### Files

A file in workspace references the corresponding file on your computer. The same commands are available, except Add folder, and files don't have a fold state symbol. You can change the full path of a file through Modify file path - for instance, to switch between two different versions in two separate directories on your computer. Enter or double click opens the file in active view.

If a project file name doesn't match the name of an existing file, its icon is overlayed to notify this condition, and you cannot open it.