Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

powreshell function cleanup

function  CleanUp {
   # Delete directory content
   Get-ChildItem -Path ($PSScriptRoot + "Files") -Recurse | ForEach-Object { $_.Delete()}
   Get-ChildItem -Path ($PSScriptRoot + "Temp") -Recurse | ForEach-Object { $_.Delete()}
   Get-ChildItem -Path ($PSScriptRoot + "Out") -Recurse | ForEach-Object { $_.Delete()}
}
 
PREVIOUS NEXT
Tagged: #powreshell #function #cleanup
ADD COMMENT
Topic
Name
9+3 =