-
Notifications
You must be signed in to change notification settings - Fork 2
/
Setup.ps1
48 lines (33 loc) · 1.09 KB
/
Setup.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#requires -version 2
<#
.SYNOPSIS
Setup
.DESCRIPTION
Set up folders structure.
.NOTES
Version: 0.1
Author: Erforschr
License: MIT License
Creation Date: 01/08/2019
#>
#---[Imports and preferences]----------------------------------------------------------------------
$ErrorActionPreference = 'Stop' # Continue SilentlyContinue Stop
#---[Variables]------------------------------------------------------------------------------------
$ScriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
#---[Create folders structure]---------------------------------------------------------------------
Write-Host "Setting folders structure up"
$Folders = @(
'Inventories',
'Drafts',
'Policies',
'Inspections'
)
ForEach ($Folder in $Folders) {
If(-not (Test-Path $([System.String]::Format("{0}\{1}", $ScriptPath, $Folders)) -PathType 'Container'))
{
$Path = [System.String]::Format("{0}\{1}", $ScriptPath, $Folder)
$t = [System.IO.Directory]::CreateDirectory($Path)
Write-Host "Create folder: $Folder"
}
}
Write-Host ""