.. _scan-targets:

Scan Targets
**************

TreeSize can analyze file system paths as well as storages and devices that aren't accessible via traditional file system paths.

These targets include any folder visible in the Windows Explorer's left pane.

This chapter details all the target types that TreeSize can scan.

.. image:: /images/TreeSize-Scan-Targets.png
   :width: 100%
   :align: center


Local File System Paths
========================================
To scan a file system path, enter the path into the drive drop-down box on top of the directory tree or use the button "Select directory for scan" on the ribbon tab "Home".

You can also double-click on the drive in the TreeSize drive list in the bottom left corner of the window to start a scan.

Remote File System Paths
========================================
If a remote path is mapped to a drive letter, scan it just like a local drive (as described above).

Additionally TreeSize supports UNC paths like ``\\servername\share``, which can be entered in the drop-down box above the directory tree.

You can also select the remote path by using the button "Select directory for scan" on the ribbon tab "Home" and browse to the path in the "Network" folder. To search your entire network, choose the "Network" folder here or use the path ``\\*``.

UNC paths can also be added to the drive list using the right-click menu.

Mobile Devices and Smartphones
========================================

Mobile devices like smartphones can be scanned with TreeSize if they support the MTP protocol or WebDAV.

Those devices are typically listed under "This PC" in the Windows Explorer and in the dialog which appears when using the button "Select directory for scan" on the ribbon "Home".

TreeSize also support entering paths to mobile devices like this: This PC\\Galaxy Tab A in the drop-down box on top of the directory tree.

WebDAV Server
====================

If the WebDAV server is listed under "This PC" in the Windows Explorer, you can use the button "Select directory for scan" on the ribbon "Home" to select this server for scanning.

You can also enter the  HTTP(S) server address into the dropdown box above the directory tree using this syntax: ``https://servername.com/path/``.

Linux/Unix Server via SSH
========================================

With TreeSize you can scan Linux or Unix servers, even though they are not integrated into your Windows storage environment.

This is possible by using the SSH network protocol. You can enter addresses of server shares to scan via SSH into the dropdown box above the directory tree using this syntax: ``ssh://servername/share``.

.. note::

    TreeSize will request login information (user name and password) for the SSH connection. Alternatively, you can include these directly in the address: ``ssh://user:password@servername/share``.

Google Drive
========================================

TreeSize can be used to analyze your Google Drive data in the cloud. To scan your Google Drive, you have a few different options:

- Use ``gdrive://`` or ``gdrive://*`` as path if you would like to scan your entire storage (excluding files that are exclusively available in "Google Photos" and which do not show up in the regular Google Drive).
- Use ``gdrive://<subpath>/<optional folder>`` to scan a specific subpath on your Google Drive.
- It is also possible to scan a specific folder by pasting its URL from your browser into TreeSize.

The login happens by using Google's secure OAuth2 implementation. You can stay logged in if you wish, and it is possible to log in and out at any time by accessing the scan target dialog's Google Drive section.

It is possible that even if you chose to stay logged in, you will be asked to log in again if the connection could not be established (for example if the saved token expired).

Amazon S3 Cloud Storage
========================================

You can scan an Amazon S3 cloud storage with TreeSize. To scan your entire S3 storage, simply type ``s3://*`` in the dropdown box on the top left and press enter. To scan a certain bucket, use: ``s3://Bucketname/``

TreeSize will ask for an access token and the corresponding secret access token with the option to save it for future use. You may also supply this information as part of the URL: ``s3://Token:SecretToken@Bucketname/``

In the column "Description", the storage class of a file (e.g. reduced redundancy oder standard) will be shown.

Azure Blob Storage
====================

It is possible to use TreeSize to analyze an Azure Blob Storage. This requires the name of the container you want to scan, as well as the storage account name and the corresponding access key.

Optionally, you can provide a path as well to scan a certain directory inside the container instead of the whole container. The access key and the storage account name can both be found in the Azure portal. Additionally, the access key can be renewed there.

It is possible to provide the credentials as part of the path: ``azureblob://Username:AccessKey@ContainerName/Path``. Alternatively, you can use ``azureblob://ContainerName/Path`` and the program will ask you for credentials afterward.

SharePoint
====================

With TreeSize you can scan local SharePoint servers (on-premises) and SharePoint Online sites, either via WebDAV or using the SharePoint REST API.

To scan a SharePoint site, simply enter the HTTP(S) server address into the dropdown box on top of the directory tree using this syntax: ``https://servername.com/path/``.

To scan a complete SharePoint server with all associated site collections use the syntax ``sharepoint://servername.com/path/``. TreeSize will then determine the actual protocol to use automatically (with a preference for HTTPS).

TreeSize will ask for the login information (user name and password) for a federated authentication or uses credentials contained with the URL, like ``https://user:password@servername.com/path/``.

TreeSize also supports multi-factor authentication if it is registered with the Azure AD.


Container-Files: ZIP, VHD(X), and ISO
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TreeSize also supports scanning container files that are using the ZIP, VHD(X), or ISO file format. To start a scan of such a file, you may simply enter the path to it, including the file name, into the drop-down box above the directory tree.

Outlook mailboxes
====================

It is possible to use TreeSize to analyze your local Outlook mailboxes.

Outlook needs to be running to allow the program to access the mailboxes and it is important that both programs run in the same user context.

This means, if you start TreeSize as administrator, you need to start Outlook as administrator as well. Only those Outlook files are scanned, of which there are also local copies on the computer on which TreeSize is running. Files outsourced to Microsoft Exchange Server are not included in the analysis.

To scan an Outlook mailbox, you can either use the scan target dialog and select the target there or use the dropdown box on the top left and insert: ``outlook://user@provider.com (your mail address)`` for example.