PowerShell: Delete Files
Delete a File
# delete a file in current dir rm .\photo.jpg
# delete a file by path rm "~/travel photo.jpg"
Remove-Item
has aliasrm
Delete File by Wildcard Pattern
delete by Wildcard pattern.
# delete macOS folder preference file dir -recurse -Force -filter .DS_Store | rm -Force
# delete emacs backup. file name ending in ~ dir -recurse -file -filter *~ | rm
Remove-Item
has aliasrm