IntelliJ IDEA 14.1.0 Help

Excluding Files and Folders from Upload/Download

Suppressing uploading, downloading, and synchronization for files or folders with sources ensures that the sources are protected against accidental update. When applied to non-sources, it saves system resources because huge amounts of media, caches, or temporal files are no longer copied hither and thither.

You may need to suppress upload/download in the following cases:

  1. You are going to work with externally created and uploaded source code. To process these remote sources in IntelliJ IDEA, you have to download them and arrange them in a project. However, there are some sources that you should not update at all. On the other hand, the folders on the remote host also may contain huge amounts of media, caches, temporal files, that you actually do not need in your work.
  2. You have already downloaded the data from the server and arranged them in a IntelliJ IDEA project. However, for this or that reason, you need to have some files or folders on the server protected against upload/download, for example, to prevent accidental overwriting.
  3. The local copy of an application contains both source code and other data that you do not need to upload. Besides, you want to protect some sources against overwriting by mistake. In this case, you can suppress upload/download for all files and folders that should not be uploaded.

There are two ways to exclude folders from upload/download:

  • Explicitly, by marking the corresponding paths as excluded in the Remote Host tool window or in the Excluded Paths tab of the Deployment dialog box.
    1. The names of all the not-excluded folders and files are displayed on green background. The names of excluded items are displayed without background.
    2. In the Remote Host tool window, you can exclude both entire folders and specific files.
  • By name, that is, by specifying patterns that determine the names of files and folders to be excluded in the Exclude Items by Name text box of the Options dialog box.

Separate files can be protected against upload/download only through excluding them by name.

In this section:

To exclude a folder on server from upload/download after project creation, do one of the following:

  • Choose the required folder right in the Remote Host tool window:
    1. On the main menu, choose Tools | Deployment | Browse Remote Host or View | Tool Windows | Remote Host .
    2. In the Remote Host tool window that opens, select the relevant server configuration from the drop-down box.
    3. Select the folder to exclude and choose Exclude Path on the context menu of the selection.
  • Add the required folder to the list of excluded paths:
    1. Open the Settings dialog box, and click Deployment or choose Tools | Deployment | Configuration on the main menu.
    2. In the Deployment dialog box, switch to the Excluded Paths tab. The tab shows list of previously excluded local and remote folders.
    3. Click the Add deployment path button. An empty line is added to the list.
    4. Click the Browse button browseButton.png. The Select remote excluded path dialog box that opens shows the data on the host accessed through the selected server configuration. Select the required folder.
    5. When you OK, you return to the Excluded Paths tab, where the selected remote folder is added to the list.

To exclude a local folder from upload/download

  1. Do one of the following:
  2. In the Deployment dialog box, switch to the Excluded Paths tab. The tab shows list of previously excluded local and remote folders.
  3. Click the Add local path button. In the empty line that is added to the list, specify the location of the folder to be protected against upload/download. Type the path manually or click the Browse button browseButton.png and choose the required folder in the dialog that opens.

To have files or folders excluded by name

  1. Do one of the following:
  2. In the Options dialog box that opens, specify the patterns that define the names of these files and folders in the Exclude items by name text box. Use semicolons as delimiters. Wildcards are welcome.

    The exclusion is applied recursively. This means that if a matching folder has subfolders, the contents of these subfolders are not deployed either.

    additional settings:

To get an excluded file or folder involved in upload/download again

  • Select the file or folder to return to upload/download and choose Remove Path from Excluded on the context menu of the selection.

See Also

Last modified: 14 July 2015