Reputation: 105
The goal is to delete the temporary internet files on a remote computer.
start psexec -u domain\username -p password -s \\xxx.xxx.xxx.xxx
cmd cd C:\Documents and Settings\USERACCOUNT\Local Settings\Temporary Internet Files
Which is connecting to the remote computer but just opening to c:windows\system
. I am then able to cd
to that directory and use del /f /s /q *.*
to delete all the problem files.
I tried using psexec \\computer cmd /c del fileName
but had even less luck with that.
Upvotes: 1
Views: 22311
Reputation: 462
Use the below command to create a directory in remote location.
psexec \\\IPAddress -u username -p Password cmd /c mkdir c:\testfolder
Upvotes: 0
Reputation: 105
I finally got it to work using
psexec -u domain\user -p password \\xxx.xxx.xxx.xxx -s cmd /c rd "C:\Documents and Settings\%USERACCOUNT%\Local Settings\Temporary Internet Files\Content.IE5\" /s /q
which connects to the remote server, goes straight to the directory I want and proceeds to delete the particular temp internet files folder that's causing issues without bothering me at all.
Upvotes: 1
Reputation: 1
Your command is okay but missing the server name
psexec \\\servername -u ...
Upvotes: 0
Reputation: 5138
Why bother cd'ing to directory first? This should work:
psexec \\1.2.3.4 -u "domain\username" -p "password" cmd /c del /f /s /q "C:\Document and Settings\USERACCOUNT\Local Settings\Temporary Internet Files"
Upvotes: 1