Solved

Delete remote machines recycle bin . Need a script to do this.

Posted on 2008-06-19
5
1,573 Views
Last Modified: 2012-06-27
Hi,

Delete remote machines recycle bin . Need a script to do this.

I have this
del \\machinename\c$\Recycler\*.* /q /s
But this is for 1 machine how can i run a scipt on a list of machine names to empty the bin.

Regards
Sharath
0
Comment
Question by:bsharath
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:JonMny
ID: 21825467
create a file computers.txt with a list of computers and then run


C:\tools>FOR /F "delims=~" %f in (computers.txt) DO del \\"%f"\c$\Recycler\*.* /
q /s
0
 
LVL 9

Accepted Solution

by:
JonMny earned 500 total points
ID: 21825510

may have to remove the quotes, if you want this in a batch file need to change %f to %%F

C:\tools>FOR /F "delims=~" %f in (computers.txt) DO del \\%f\c$\Recycler\*.* /q
/s
0
 
LVL 1

Expert Comment

by:PhilJMcDougall
ID: 21931740
im after something like this also.... can anyone make one with a popup box (e.g. VBscript) that you input the remote pc name...
0
 
LVL 11

Author Comment

by:bsharath
ID: 21931818
For a single machine use something like this

del \\Machine Name\c$\Recycler\*.* /q /s

Sorry not sure of a popup
0
 
LVL 11

Author Comment

by:bsharath
ID: 21931819
For a single machine use something like this

del \\Machine Name\c$\Recycler\*.* /q /s

Sorry not sure of a popup
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now