Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# 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