Here’s how to do that.

If you knowhow to get file or folder paths, skip to the relevant section below.

If you aren’t sure how to copy a file or folders full path, well show you how.

Windows PowerShell.

Hannah Stryker / How-To Geek

First,open a File Explorer windowand locate the file or folder whose path you want to find.

Youve successfully copied the selected items path to your clipboard.

you’re able to nowpaste this path(using Ctrl+V) wherever required within the PowerShell window.

‘Copy as Path’ highlighted in Windows' context menu.

Start byopening a PowerShell window on your PC.

Deleting a folder removes all the subfolders and files inside it.

This translates to selecting all the files in the specified folder.

The ‘Remove-Item’ cmdlet to delete a file in a PowerShell window.

The “Include” parameter ensures files with any name and extension are removed.

In all the examples below, replace “PATH” with the full path to your folder.

The ‘Remove-Item’ cmdlet to delete a folder in a PowerShell window.

The ‘Remove-Item’ cmdlet to delete all files inside a folder on a PowerShell window.

The ‘Remove-Item’ cmdlet to recursively delete items on a PowerShell window.