Changes between Initial Version and Version 1 of Ticket #22159
- Timestamp:
- Sep 5, 2024 6:06:53 PM (3 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #22159 – Description
initial v1 46 46 I've created the following powershell script and tested against a nested directory structure to make it properly recognizable for the 7.x virtualbox. It works, but again I do NOT want to reinstrument ACLs around my defaul user home directory on windows (and I would not have selected it on installation, this was a default at some point in my install history it looks like...) 47 47 48 (corrected script uploaded to address parent path having trailing slash properly) 48 49 49 50 {{{ 50 # Script: fixpaths.ps1 51 # Version: 1.1.0 51 # Version: 1.3.0 52 52 53 53 # Check if a path was provided as a command-line argument … … 57 57 } 58 58 59 # Get the path from the command-line arguments 60 $targetPath = $args[0] 59 # Get the path from the command-line arguments and normalize it 60 $targetPath = $args[0].TrimEnd('\') 61 61 62 62 # Check if the path exists … … 66 66 } 67 67 68 # Normalize the path 69 $targetPath = [System.IO.Path]::GetFullPath($targetPath) 70 68 71 # Get the parent directory 69 $parentPath = [System.IO.Directory]::GetParent($targetPath).FullName 72 $parentPath = [System.IO.Directory]::GetParent($targetPath) 73 74 if (-not $parentPath) { 75 Write-Host "No parent directory found for the specified path." 76 exit 1 77 } 78 79 $parentPath = $parentPath.FullName 70 80 71 81 # Define the set of commands to be run for each directory … … 102 112 103 113 # Run the commands against each child directory 104 foreach ($child in $childDirectories) {105 Run-Commands -path $child.FullName106 }107 108 Write-Host "Completed running commands."109 114 110 115 }}}