< Back
Get-ODUExportOlderPath
Post
NAME Get-ODUExportOlderPath
SYNOPSIS
Gets an older (not latest) export full folder path that matches YYYYMMDD-HHMMSS name format
SYNTAX
Get-ODUExportOlderPath [[-Hours] <Int32>] [<CommonParameters>]
DESCRIPTION
Gets an older (not latest) export full folder path that matches YYYYMMDD-HHMMSS name format.
If no value is passed for parameter Hours it returns the most recent export path before the
latest export. If an Hours value is passed it finds the first export that many hours older
than the most recent export and returns that path.
The folder names that are parsed/returned must match YYYYMMDD-HHMMSS name format or, more
specifically: ^\\d{8}-\\d{6}$
If you copy & rename a folder it won't get returned unless it matches that format.
PARAMETERS
-Hours <Int32>
Minimum number of hours older the export should be compared to latest export
Required? false
Position? 1
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-ODUExportOlderPath
c:\\OctoExports\\MyOctoServer.octopus.app\\20181107-185919
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ODUExportOlderPath 24
c:\\OctoExports\\MyOctoServer.octopus.app\\20181105-1132512
RELATED LINKS
https://github.com/DTW-DanWard/OctopusDeployUtilities
SYNOPSIS
Gets an older (not latest) export full folder path that matches YYYYMMDD-HHMMSS name format
SYNTAX
Get-ODUExportOlderPath [[-Hours] <Int32>] [<CommonParameters>]
DESCRIPTION
Gets an older (not latest) export full folder path that matches YYYYMMDD-HHMMSS name format.
If no value is passed for parameter Hours it returns the most recent export path before the
latest export. If an Hours value is passed it finds the first export that many hours older
than the most recent export and returns that path.
The folder names that are parsed/returned must match YYYYMMDD-HHMMSS name format or, more
specifically: ^\\d{8}-\\d{6}$
If you copy & rename a folder it won't get returned unless it matches that format.
PARAMETERS
-Hours <Int32>
Minimum number of hours older the export should be compared to latest export
Required? false
Position? 1
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-ODUExportOlderPath
c:\\OctoExports\\MyOctoServer.octopus.app\\20181107-185919
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ODUExportOlderPath 24
c:\\OctoExports\\MyOctoServer.octopus.app\\20181105-1132512
RELATED LINKS
https://github.com/DTW-DanWard/OctopusDeployUtilities