WinSCP.format.ps1xml

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
    <!-- ################ VIEW DEFINITIONS ################ -->
    <ViewDefinitions>
       <View>
            <Name>DefaultView</Name>
            <ViewSelectedBy>
                <TypeName>WinSCP.RemoteFileInfo</TypeName>
            </ViewSelectedBy>
            <GroupBy>
                <Label>Directory</Label>
                <ScriptBlock>
                    if ($_.FullName -eq '/') {
                        './'
                    } else {
                        ".$((Split-Path -Path $_.FullName -Parent).Replace('\','/'))"
                    }
                </ScriptBlock>
            </GroupBy>
            <TableControl>
                <TableHeaders>
                   <TableColumnHeader>
                      <Label>Mode</Label>
                      <Width>9</Width>
                      <Alignment>left</Alignment>
                   </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>LastWriteTime</Label>
                        <Width>25</Width>
                        <Alignment>right</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Length</Label>
                        <Width>10</Width>
                        <Alignment>right</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Name</Label>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <Wrap/>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>FilePermissions</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>LastWriteTime</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    if ($_.IsDirectory) {
                                        $null
                                    } else {
                                        $_.Length
                                    }
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    $_.Name
                                </ScriptBlock>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
        <View>
            <Name>DefaultView</Name>
            <ViewSelectedBy>
                <TypeName>WinSCP.Session</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                   <TableColumnHeader>
                      <Label>Opened</Label>
                      <Width>9</Width>
                      <Alignment>left</Alignment>
                   </TableColumnHeader>
                   <TableColumnHeader>
                        <Label>Timeout</Label>
                        <Width>10</Width>
                        <Alignment>right</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>HostName</Label>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <Wrap/>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>Opened</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Timeout</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>HostName</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
        <View>
            <Name>DefaultView</Name>
            <ViewSelectedBy>
                <TypeName>WinSCP.TransferOperationResult</TypeName>
            </ViewSelectedBy>
            <GroupBy>
                <Label>Destination</Label>
                <ScriptBlock>
                    Split-Path -Path $_.Transfers[0].Destination -Parent
                </ScriptBlock>
            </GroupBy>
            <TableControl>
                <TableHeaders>
                   <TableColumnHeader>
                      <Label>IsSuccess</Label>
                      <Width>9</Width>
                      <Alignment>left</Alignment>
                   </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>FileName</Label>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <Wrap/>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>IsSuccess</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    Split-Path -Path $_.Transfers.FileName -Leaf
                                </ScriptBlock>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
    </ViewDefinitions>
</Configuration>