Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

using a script to delete a single file from multiple workstations

Posted on 2009-07-01
3
Medium Priority
?
382 Views
Last Modified: 2012-06-22
hi i am trying to delete a single file from multiple workstations. i figured this might be easier if i used a script. anyone have a script that can handle this ?
0
Comment
Question by:chaz21
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 41

Accepted Solution

by:
Kyle Abrahams earned 2000 total points
ID: 24757554
as long is it's in the same path you can do this with 2 bat files:

bat file 1:  Named mydel.bat
del \\%1\C$\  < y.txt

bat file 2:
mydel workstation1
mydel workstation2

y.txt: - simple character "Y" to import the Yes for delete.
y


You could do this with a VB script if you just had a list of workstations already listed, but assuming your doing this from scratch.  



0
 
LVL 41

Expert Comment

by:Kyle Abrahams
ID: 24757561
note you need to change the path of the del command.
0
 
LVL 2

Expert Comment

by:candyman2112
ID: 24768702
If you run a logon script, and it's a basic batch file, you could add this command to do the delete:

e.g. to delete the file test.txt on the C:\ drive if it exists.....
IF EXIST c:\test.txt DEL c:\test.txt /F /Q

If your logon script uses a different scripting language, it must also be possible to run a similar command.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

618 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