Skip to content

backup export will override 'root'-files if multiple folders, given in cfg, containing 'root'-files with same name #107

@michmue

Description

@michmue

Exporting multiple files with same name into one root folder will override them.
Current code only has temporary workaround for specific Policy exports case.

  • workaround: don't multiple folder entires in config for one app which have same filenames in there root location
  • fix1: check for multiple filenames beforehand -> get der parent folder name -> create subfolders in app backup location
  • fix2 (simple): always create subfolders with name of last folder given in each folders entries

if ($appConfig.Name -eq "Policy") {
$parentFolder = (Split-Path $file) -split "\\" | Select -Last 1
$newItemPath = "$Path/$($appConfig.Name)/$parentFolder/$fileName"
}

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions