Cannot delete a windows folder containing a huge number of files

I have a Netgear ReadyNAS Pro on our little network that we use as our file server.  This gets backed up to an external hard drive, which connects directly to a USB port on the ReadyNAS.  I am trying to delete some of the backups.  Unfortunately, amongst the data is a folder that contains a huge number of files.  When I try to delete it in Windows explorer it looks like it is going to take 2 hours.

I need a faster method.  Can anyone tell me a better way?

The path for this folder, which I will call "foldertodelete" is:
\\192.168.0.5\usb_hdd_1\foldertodelete

Thank you for any help.
LVL 1
Now ThenNot applicableAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

unknown_routineCommented:
Go to command window and use:

rd /s /q foldertodelete

Open in new window



Also try to run above on \\192.168.0.5\usb_hdd_1

directly(Run the rd /s /q foldertodelete from the usb_hdd_1 folder)

Also how huge is the number of files? are we talking about tens of thousands? If so it will take a long time to delete these.
0
Now ThenNot applicableAuthor Commented:
Yes, I would imagine 10s of 1000s.

I have already tried rd /s /q "\\192.168.0.5\usb_hdd_1\foldertodelete"

I got the reply "Access is denied".
I can't understand why because I appear to have access through Windows Explorer.
0
Now ThenNot applicableAuthor Commented:
If I try changing directory to a mapped network drive, it says "Access is denied".  I don't understand that either.
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Thomas GrassiSystems AdministratorCommented:
How does this folder get populated?

You can set up a script to run daily to clear this folder that way it will not get so large.

Try to delete by file extension

del *.txt as an example  this will start to reduce the size down.

As far as the access is denied goes on a NAS device you need to give users access to the drive from within the GUI interface. Usually in the shares section.  We have several NAS devices and that's what we did and have no problem.


The rd command is trying to remove the directory and it will not let you when you are in explorer you are only trying to delete files.

I can help with a script if you want.
0
Now ThenNot applicableAuthor Commented:
The folder is created by some third party document management software.  Yes, it is a stupid system.  But I have to live with it.  I can't delete the files stored on the NAS.  I just want to delete the folder in the backup disk.
0
Now ThenNot applicableAuthor Commented:
The NAS says that the share USB_HDD_1 is owned by root.  It says that root has read/write access.  It also says that everyone has read/write access.  So I don't see why I don't have access through command but I do through windows explorer.
0
Thomas GrassiSystems AdministratorCommented:
can you see all the files in explorer?

Can you just select a few at a time and try to delete

I know that sounds bad but may be only way
0
Now ThenNot applicableAuthor Commented:
I am logged into the windows PC as administrator.
0
Now ThenNot applicableAuthor Commented:
Yes I can see the files.
0
Thomas GrassiSystems AdministratorCommented:
good then try to delete a 100 see what happens
0
Now ThenNot applicableAuthor Commented:
I can delete them; it's just that it takes ages to prepare to delete and then it takes ages deleting them.
0
Thomas GrassiSystems AdministratorCommented:
That's good why not try to sort by file extension and delete that group see if that works.

If this a folder that gets updated daily with more files?

If so like I suggested a script can be setup to maintain this folder.
0
McKnifeCommented:
Network deletions are always slower than local ones. Connect the drive to your own computer.
0
Now ThenNot applicableAuthor Commented:
In the end, the quickest way to delete the folder was in Windows Explorer.  However, I did press the shift key at the same time as the delete key.  I don't know if the shift key made any difference.  The command line was not faster and often crashed before the process was finished.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Now ThenNot applicableAuthor Commented:
Nothing else helped.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SBS

From novice to tech pro — start learning today.