Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file.

## [2.1.27.1] - 2025-09-12
- Bugfix for `Get-PVFileList` with PACLI > v13

## [2.1.27] - 2020-04-01

- `Set-PVSafe`
Expand Down
10 changes: 7 additions & 3 deletions PoShPACLI/Functions/FoldersFiles/Get-PVFileList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
PROCESS {

#execute pacli
$Return = Invoke-PACLICommand $Script:PV.ClientPath FILESLIST "$($PSBoundParameters | ConvertTo-ParameterString) OUTPUT (ALL,ENCLOSE)"
# new column CATEGORYMODIFICATIONDATE returned in v13.x
# Add explicit column list to avoid breaking in the future
$Return = Invoke-PACLICommand $Script:PV.ClientPath FILESLIST ("$($PSBoundParameters | ConvertTo-ParameterString) " +
"OUTPUT (NAME,INTERNALNAME,CREATIONDATE,CREATEDBY,DELETIONDATE,DELETEDBY,LASTUSEDDATE,LASTUSEDBY,SIZE,HISTORY,RETRIEVELOCK,LOCKDATE,LOCKEDBY,FILEID,DRAFT,ACCESSED,LOCKEDBYGW,VALIDATIONSTATUS,LOCKEDBYUSERID,CATEGORYMODIFICATIONDATE,ENCLOSE)")

if ($Return.ExitCode -eq 0) {

Expand All @@ -53,10 +56,10 @@
$Results = $Return.StdOut | ConvertFrom-PacliOutput

#loop through results
For ($i = 0 ; $i -lt $Results.length ; $i += 19) {
For ($i = 0 ; $i -lt $Results.length ; $i += 20) {

#Get Range from array
$values = $Results[$i..($i + 19)]
$values = $Results[$i..($i + 20)]

#Output Object
[PSCustomObject] @{
Expand All @@ -80,6 +83,7 @@
"LockedByGW" = $values[16]
"ValidationStatus" = $values[17]
"LockedByUserID" = $values[18]
"CategoryModificationDate" = $values[19]
"Safename" = $safe
"Folder" = $folder

Expand Down
2 changes: 1 addition & 1 deletion Tests/Get-PVFileList.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Describe $FunctionName {

Mock Invoke-PACLICommand -MockWith {
[PSCustomObject]@{
StdOut = $((((1..19) * 7 -join '" "') -replace '^', '"') -replace '$', '"')
StdOut = $((((1..20) * 7 -join '" "') -replace '^', '"') -replace '$', '"')
ExitCode = 0
}
}
Expand Down