Solved

Force Deletion of bak files

Posted on 2009-05-08
2
316 Views
Last Modified: 2012-05-06
I need to delete all *.bak files in my win 2003 file server.

 I already tried "del e:\*.bak /q /s /f" but i am getting an error that file names are too long or too deep.

Can robocopy do this? what about a vbscript?

Thanks
0
Comment
Question by:lurezero
  • 2
2 Comments
 
LVL 3

Expert Comment

by:SalmanZG
ID: 24340577
For deletion, I use robocopy to move all selected files to a temp folder and then simply delete that folder.

Hope this helps.
0
 
LVL 3

Accepted Solution

by:
SalmanZG earned 500 total points
ID: 24340624
robocopy <source> <dest> *.bak /mov /s
rmdir <dest> /S /Q
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

912 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

23 Experts available now in Live!

Get 1:1 Help Now