Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I delete the contents of the 'INetCache' folder from the command prompt?

I'm using Windows 10 and need to update a batch file to clear the contents of folder at "C:\Users\myUserName\AppData\Local\Microsoft\Windows\INetCache". This is the folder that holds cache for Internet Explorer.

I would have thought the command was simply as follows:

DEL /S /F /Q C:\Users\myUserName\AppData\Local\Microsoft\Windows\INetCache\\*

This command executes without issue, but when I look at the contents of the folder via Windows Explorer, it still has stuff in it. I say "stuff" because while it looks like a bunch of files, they don't behave like typical files. For instance, I cannot see these files when when I use "dir" on the command prompt no matter which flags I utilize. And when I examine the properties of these files, there is barely any information associated with them.

Why isn't my DEL command clearing out these files?

Screenshot of "files" still present in my INetCache folder

Screenshot of the properties of one of these files

like image 572
ConQ Avatar asked Sep 06 '25 03:09

ConQ


1 Answers

I found that using the "rmdir" command instead of the "del" command resolved my issue.

rmdir "C:\Users\myUserName\AppData\Local\Microsoft\Windows\INetCache" /s /q
like image 164
ConQ Avatar answered Sep 10 '25 05:09

ConQ