CyberPolice

An epic windows securing and hardening script
Log | Files | Refs | README

MakeCheckFileDirectories.ps1 (1292B)


      1 Write-Host Making required folders and files... -ForegroundColor Gray
      2 $thispath=Split-Path -parent $MyInvocation.MyCommand.Definition
      3 $path = Split-Path -parent $thispath
      4 $path2=Get-content $path/CyberPoliceOutput/path.txt
      5 
      6 if(!(Test-Path "$path2\CheckFilesOutput\")){New-Item -ItemType Directory -Force -Path $path2\CheckFilesOutput\ | Out-Null}
      7 if(!(Test-Path "$path2\CheckFilesOutput\VerySuspicious\")){New-Item -ItemType Directory -Force -Path $path2\CheckFilesOutput\VerySuspicious\ | Out-Null}
      8 if(!(Test-path "$path2\CheckFilesOutput\VerySuspicious\FoundInUsers.txt")){New-Item -path $path2\CheckFilesOutput\VerySuspicious\ -name FoundInUsers.txt -type "file" | Out-Null}
      9 if(!(Test-Path "$path2\CheckFilesOutput\FoundInAppData\")){New-Item -ItemType Directory -Force -Path $path2\CheckFilesOutput\FoundInAppData\ | Out-Null}
     10 if(!(Test-path "$path2\CheckFilesOutput\FoundInAppData\FoundInAppData.txt")){New-Item -path $path2\CheckFilesOutput\FoundInAppData\ -name FoundInAppData.txt -type "file" | Out-Null}
     11 if(!(Test-Path "$path2\CheckFilesOutput\Extentions\")){New-Item -ItemType Directory -Force -Path $path2\CheckFilesOutput\Extentions\ | Out-Null}
     12 if(!(Test-Path "$path2\CheckFilesOutput\Tools\")){New-Item -ItemType Directory -Force -Path $path2\CheckFilesOutput\Tools\ | Out-Null}