minor fixes
This commit is contained in:
parent
8898a93879
commit
082b6d2847
1 changed files with 2 additions and 2 deletions
|
@ -12,8 +12,8 @@ function trash --description "Move file or directory to the windows recycle bin.
|
||||||
set file "$argv[1]"
|
set file "$argv[1]"
|
||||||
powershell.exe -Command "& {" \
|
powershell.exe -Command "& {" \
|
||||||
" Add-Type -AssemblyName 'Microsoft.VisualBasic';" \
|
" Add-Type -AssemblyName 'Microsoft.VisualBasic';" \
|
||||||
" Get-ChildItem -Path $file | ForEach-Object {" \
|
" Get-ChildItem -Path '$file' | ForEach-Object {" \
|
||||||
" if (\$_.GetType() -eq [System.IO.DirectoryInfo]) {" \
|
" if (\$_ -is [System.IO.DirectoryInfo]) {" \
|
||||||
" [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteDirectory(\$_.FullName, 'OnlyErrorDialogs', 'SendToRecycleBin')" \
|
" [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteDirectory(\$_.FullName, 'OnlyErrorDialogs', 'SendToRecycleBin')" \
|
||||||
" } else {" \
|
" } else {" \
|
||||||
" [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile(\$_.FullName, 'OnlyErrorDialogs', 'SendToRecycleBin')" \
|
" [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile(\$_.FullName, 'OnlyErrorDialogs', 'SendToRecycleBin')" \
|
||||||
|
|
Loading…
Reference in a new issue