---
title: "Aspose::Email::Storage::Pst::PersonalStorage::TryToGetFolderById method"
url: "https://reference.aspose.com/email/cpp/aspose.email.storage.pst/personalstorage/trytogetfolderbyid/"
product: "Aspose.Email for C++"
description: "Gets the folder associated with the specified entry ID."
---


## TryToGetFolderById {#trytogetfolderbyid}

Gets the folder associated with the specified entry ID.

**Returns:** true if the folder is successfully found; otherwise, false.

```cpp
TryToGetFolderById(System::String entryIdString, System::SharedPtr < FolderInfo > & folder)
```

| Parameter | Description |
| --- | --- |
| entryIdString | The string that represented the entry ID. |
| folder | When this method returns true, contains the FolderInfo object associated with the specified ID. |

