Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ChildDirectories = Get-ChildItem -Directory -Path "." #Gets all Applications Sub Folders
- foreach($Directory in $ChildDirectories) { #Loops through each Applications Sub Folder
- $Files = $Directory.GetFiles() #Gets all files within each Applications Sub Folder
- foreach($File in $Files) { #Loops through each file within each Applications Sub Folder
- if($File.Name -eq "SuperLTI.exe") { #If a sub directory within an Applications Sub Folder contains SuperLTI.exe
- Copy-Item -Path "SuperLTI.exe" -Destination $Directory #Replace it with a copy at Applications root.
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement