June 2005

Automatically Deleting Files on a Shared System


RSS
Subscribe to Windows IT Pro | See More Scripting Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    Ask the Experts

I'm in charge of a computer that company employees use to present Microsoft PowerPoint presentations. As you can imagine, the presentation files accumulate rapidly. Can you show me a simple way to delete the presentations automatically from this machine?

The solution to your problem is indeed simple. You need to give the presenters permission to copy files to only one location on this machine. For example, give the users designated as presenters permission to copy files to a desktop folder called Presentations. Then, write a simple script that contains the following code (which should all appear on one line):

CD C:\Documents and 
  Settings\speakers.Domain
name\Desktop\Presentations
  Delete /Q *.*

The /Q option deletes all files without question. If you use the command in a logon script, each time the machine reboots, all files in the desktop folder would be erased. (Make sure presenters know to keep a copy of the presentation on their own computers.) Some third-party applications can perform this task for you, but most are very aggressive and delete more than just files.

End of Article



Windows IT Pro Community
Blogs





Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

7 Ways To Get More From Your SharePoint Deployment Now

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


SQL Server Magazine Office & SharePoint Pro DevProConnections asp.netPRO ITTV
IT Library Technology Resource Directory Connected Home Windows SuperSite
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc.     Terms of Use | Privacy Statement | Reprints and Licensing