Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to Delete All "dllcache" Files From a Remote Xp Machine via Cmd/Psexec/Bat etc... Command?

$
0
0

We sometimes delete some folder/files on remote machines (e.g. temp, prefetch etc) via PsExec cmd command. But we can not delete dllcache. Are these dllcache files undeletable by remote commands?

For ex in a bat:

@echo off
SET /P ComputerName=Computer IP or Host Name: 
start cmd /c psexec \\%ComputerName% cmd /c "for /d "%%a" in ("c:\windows\system32\dllcache*") do del /s /q/ f /a "%%a"" ^& pause

If I change the directory (for ex temp) it deletes well. But this doesnt work. Interestingly, it doesnt give any error. Is this script nonsense?



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>