Force Deletion of bak files

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
lurezeroAsked:
Who is Participating?
 
SalmanZGConnect With a Mentor Commented:
robocopy <source> <dest> *.bak /mov /s
rmdir <dest> /S /Q
0
 
SalmanZGCommented:
For deletion, I use robocopy to move all selected files to a temp folder and then simply delete that folder.

Hope this helps.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.