File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) Microsoft Corporation. All rights reserved.
2+ # Licensed under the MIT License.
3+
4+ <#
5+ . Synopsis
6+ Copy files to a new location that is the parent of the current directory.
7+ . Description
8+ Receives an encoded string value and decodes it using base64.
9+ Write the new decoded string to a local file for later consumption.
10+ . Parameter inputPath
11+ The encoded string we wish to decode.
12+ #>
13+
14+ Param (
15+ [Parameter (Mandatory = $true )][string ]$inputPath
16+ )
17+
18+ $parentDirectory = (Get-Item $inputPath ).Parent
19+ Push-Location $inputPath
20+
21+ Get-ChildItem ' *' - Filter * .java - recurse | ForEach-Object {
22+ $TargetDirectory = $_.DirectoryName.Replace ($inputPath , " " )
23+ $TargetPath = Join-Path - Path $parentDirectory - ChildPath $TargetDirectory
24+ If (! (Test-Path $TargetPath )) {
25+ mkdir $TargetPath | out-null
26+ }
27+ $_ | Move-Item - Destination $TargetPath - Force
28+ }
29+ Pop-Location
You can’t perform that action at this time.
0 commit comments