Solved

Windows 2008 server script to delete all .* files

Posted on 2010-11-17
3
562 Views
Last Modified: 2012-05-10
I ave a file server with over 2million files. I tested a replication software and it created a 4kb hidden file for every file and folder

e.g.  C:\Department\Finance\2008\Leave.xls there would be a file
C:\Department\Finance\2008\._Leave.xls (all file now have a ._ prefix 4kb shadow file)

Is there a script or command I can use to recurse all folders to delete any file with a "._" prefix?

Thanks.

0
Comment
Question by:sidartra
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
dacasey earned 167 total points
ID: 34156999
Is this a one time operation?  If so simpley click on my computer and c drive then in the search box type enough of your file name to be unique ie _Leave.  

When the search returns you can select all and delete.
0
 
LVL 10

Assisted Solution

by:jramsier
jramsier earned 333 total points
ID: 34157050
Make a command:

Del /f /s /q C:\Department\Finance\*._ prefix"


f = force
s = include subfolders
q = does not prompt for delete

Edit as needed.
0
 
LVL 10

Assisted Solution

by:jramsier
jramsier earned 333 total points
ID: 34157068
Forgot the first quote on that script line.

Del /f /s /q "C:\Department\Finance\*._ prefix"

0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

This article will help you understand what HashTables are and how to use them in PowerShell.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

808 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