F5F Stay Refreshed Software General Software Here is a simple way to delete all files and folders that have a certain name inside:

Here is a simple way to delete all files and folders that have a certain name inside:

Here is a simple way to delete all files and folders that have a certain name inside:

U
UnicornCracker
Senior Member
663
04-28-2026, 01:13 PM
#1
Here is a way to delete all folders that have "coffee" in them inside your C drive. This includes hidden spots like AppData or ProgramData. You can use this script:

Start a new PowerShell window and type the following commands one after another without pressing Enter in between them so they run together:

Copy these lines into your Command Prompt (cmd) or PowerShell:

```powershell
# Tell Windows to ignore special folders for this command
Set-Location -Path C:\
Get-ChildItem -Filter coffee -Recurse -Force | Remove-Item -Recurse -Force
```

When you finish typing the commands, press **Enter** only once at the very end. This will go through every folder looking for "coffee" and delete it if found. If there are no folders with that name, nothing will happen and your computer stays safe.
U
UnicornCracker
04-28-2026, 01:13 PM #1

Here is a way to delete all folders that have "coffee" in them inside your C drive. This includes hidden spots like AppData or ProgramData. You can use this script:

Start a new PowerShell window and type the following commands one after another without pressing Enter in between them so they run together:

Copy these lines into your Command Prompt (cmd) or PowerShell:

```powershell
# Tell Windows to ignore special folders for this command
Set-Location -Path C:\
Get-ChildItem -Filter coffee -Recurse -Force | Remove-Item -Recurse -Force
```

When you finish typing the commands, press **Enter** only once at the very end. This will go through every folder looking for "coffee" and delete it if found. If there are no folders with that name, nothing will happen and your computer stays safe.

D
Derpstorm22
Junior Member
4
04-28-2026, 10:41 PM
#2
I bought the free version of BareGrep so I could search every file that mentions it and find all the folders related to it. Since I use this tool every day, my professional license was worth more than just buying one for work. As a developer, you can see how important having such a tool is.
D
Derpstorm22
04-28-2026, 10:41 PM #2

I bought the free version of BareGrep so I could search every file that mentions it and find all the folders related to it. Since I use this tool every day, my professional license was worth more than just buying one for work. As a developer, you can see how important having such a tool is.

C
coolmatt30
Junior Member
49
04-29-2026, 02:26 AM
#3
Did your computer catch a bad virus? Maybe that's why it created extra folders or files inside each drive, level by level.
C
coolmatt30
04-29-2026, 02:26 AM #3

Did your computer catch a bad virus? Maybe that's why it created extra folders or files inside each drive, level by level.

J
jxavierpinto
Junior Member
3
04-29-2026, 03:53 AM
#4
Check your spelling carefully when using strings. FYI: https://stackoverflow.com/questions...or...powershell http://www.powershellcookbook.com/recipe...-a-pattern https://docs.microsoft.com/en-us/po...or...rshell-7.1 One thing to watch: Make sure you are looking for files that have the word "coffee" in their name. Look at the results first so your script doesn't accidentally delete or change things you don't want it to. Then pipe into Remove-Item. Test on copies of the folders too just in case. Back up everything before running this thing because Remove-Item can be too strong sometimes.
J
jxavierpinto
04-29-2026, 03:53 AM #4

Check your spelling carefully when using strings. FYI: https://stackoverflow.com/questions...or...powershell http://www.powershellcookbook.com/recipe...-a-pattern https://docs.microsoft.com/en-us/po...or...rshell-7.1 One thing to watch: Make sure you are looking for files that have the word "coffee" in their name. Look at the results first so your script doesn't accidentally delete or change things you don't want it to. Then pipe into Remove-Item. Test on copies of the folders too just in case. Back up everything before running this thing because Remove-Item can be too strong sometimes.

Z
Zertaro
Member
56
05-10-2026, 01:37 AM
#5
No, that's a long-standing program I really want to get rid of! I already took out all the registry stuff related to it. Now I need to delete every single folder too. When I looked manually on "AppData and ProgramData", some folders were still there in other parts of my drive.
Z
Zertaro
05-10-2026, 01:37 AM #5

No, that's a long-standing program I really want to get rid of! I already took out all the registry stuff related to it. Now I need to delete every single folder too. When I looked manually on "AppData and ProgramData", some folders were still there in other parts of my drive.

R
RadBount
Member
59
05-10-2026, 08:28 AM
#6
Use baregrep, free version to find every file that mentions it and check all folders in your search area. Bare Metal Software > BareGrep - Free grep for Windows I bought a license for the professional version because I use them all the time baretail too. As a developer you can see how important a tool it is
R
RadBount
05-10-2026, 08:28 AM #6

Use baregrep, free version to find every file that mentions it and check all folders in your search area. Bare Metal Software > BareGrep - Free grep for Windows I bought a license for the professional version because I use them all the time baretail too. As a developer you can see how important a tool it is

B
127
05-10-2026, 11:29 AM
#7
Great. Just exactly what I wanted. Thanks a lot!
B
bella_kittyboo
05-10-2026, 11:29 AM #7

Great. Just exactly what I wanted. Thanks a lot!