Avatar of adrian78
adrian78
 asked on

Deleting a folder with 1 million files on Windows Server 2008

I am trying to delete a folder that has about 1 million files in it.  It is a Windows Server 2008.  It is a temporary folder containing small XML files that were I guess downloaded when a SQL Server Job was being executed that imported data from an XML Feed.

The problem is that I try deleting the files via command prompt and it just doesn't work.  I think it ends up hanging due to enumerating the files.  I am not sure how to delete all of the files without enumerating.

Any help would be appreciated!
PowershellWindows Server 2008Microsoft SQL Server

Avatar of undefined
Last Comment
Ben Personick (Previously QCubed)

8/22/2022 - Mon
SOLUTION
Scott Silva

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Ben Personick (Previously QCubed)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Mahesh

one other option could be open folder within WinRAR and delete from WinRAR itself, you do need to install WinRAR trial version on server

I have used WinRAR to delete folders which contains files with more than 220 characters long
adrian78

ASKER
Thanks guys!  The hosts manage to do it for me just before your solution was posted but I'll be using it for future.  Appreciate it.
Ben Personick (Previously QCubed)

Glad to Help Adrian :)
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck