# Example module
{: .no_toc }

A demonstration module that prints all Windows shell file properties for a chosen file to the Debug console.

## Members

### DisplayInDebugConsole

Opens a file and prints each of its shell properties -- name and localized value -- to the Debug console.

Syntax: **DisplayInDebugConsole** [ *FilePath* ]

*FilePath*
: *optional* A **String** holding the full path of the file to inspect. If omitted or empty, a file dialog is displayed so the user can choose the file interactively.

**DisplayInDebugConsole** calls [**FilePropertyExplorer.OpenFile**](/tB/Packages/Contributed/FileProps/FilePropertyExplorer/OpenFile.md) when *FilePath* is not empty, or [**FilePropertyExplorer.BrowseAndOpenFile**](/tB/Packages/Contributed/FileProps/FilePropertyExplorer/BrowseAndOpenFile.md) otherwise. Each property in the returned [**FileProperties**](/tB/Packages/Contributed/FileProps/FileProperties/index.md) collection is printed on its own line: the system name (**FileProperty.Name**), then the localized value string (**FileProperty.ValueDesc**), positioned further right with `Tab(80)`.

## Example

This example prints all shell properties of a specific file to the Debug console by supplying a path directly.

```tb check_build
Sub Main()
    Example.DisplayInDebugConsole "C:\Users\Public\Pictures\Sample.jpg"
End Sub
```

To use the interactive file-open dialog instead, call the procedure without an argument:

```tb check_build
Sub Main()
    Example.DisplayInDebugConsole
End Sub
```

## See Also

- [FilePropertyExplorer](/tB/Packages/Contributed/FileProps/FilePropertyExplorer/index.md) class -- opens a file and returns its shell properties
- [FileProperties](/tB/Packages/Contributed/FileProps/FileProperties/index.md) class -- read-only collection of shell properties for a file
- [FileProperty](/tB/Packages/Contributed/FileProps/FileProperty/index.md) class -- one shell property entry with name, ID, and value
- [FileProps package](/tB/Packages/Contributed/FileProps/index.md) -- overview of all classes and modules
