Solved

using a script to delete a single file from multiple workstations

Posted on 2009-07-01
3
368 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 40

Accepted Solution

by:
Kyle Abrahams earned 500 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 40

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

Suggested Solutions

Title # Comments Views Activity
Windows server 2008 exchange 3 25
Exchange 2010 Server - Phishing attack 3 51
Auto BCC 8 25
exchange 2007, calendar 3 18
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

726 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