Created
June 11, 2017 08:31
-
-
Save aadennis/7441dfe747b35560e21b82a72f93d792 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Try to remove all files from a named folder, typically on a DVD | |
#Remove-Item -Path E:\Set1 -Recurse -Force | |
$targetDir = "E:\Set1b" | |
$set = gci -Path $srcDir -Filter *.mp4 | |
$set | % { | |
$file = $_ | |
$baseName = $file.BaseName | |
$target = "$targetDir/$baseName.mp4" | |
"Deleting [$target]" | |
Remove-Item -Path $target -Force -ErrorAction Continue | |
Start-Sleep 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment