Question

I'm trying to remove a specific directory from every User's AppData directory within Win7. We had a bad install of Cisco on multiple computers, and part of fixing it is that we need to remove AppData\Local\Cisco from every user on the computer prior to uninstalling, Wouldn't be an issue except every computer has anywhere from 5-20 users on it. I've tried the following:

for /D %%f in (Cisco) do rmdir %%f /s

And running that from the Users directory. It's not working though, and I'm unsure the best route to removing this directory from all users on the computer, if I try a del or rmdir with wildcards, that breaks as well. Any ideas?

Was it helpful?

Solution

Run this in the users folder from the cmd prompt and check that it returns the correct folders.

for /d /r %a in (cisc*) do @echo %a

If so then add the RD command.

for /d /r %a in (cisc*) do rd /q /s "%a"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top