Link to home
Start Free TrialLog in
Avatar of lianne143
lianne143Flag for United States of America

asked on

Syntax to delete a folder using ROBOCOPY

Hi

 I have a shared drive on a windows 2012 server called " Shared"
 Within this drive , there is a folder called SCIENCE and within this folder there are sub folders.
 Initially I copied this folder from another server through Robocopy. Now I would like to delete this SCIENCE folder.

 When I delete I get and error that says Item Not found
 Could not find this item
 This is no longer located in E:\Shared. Verify the items location and try again.

 Please let me know how to delete this SCIENCE Folder. Is there a way of deleting this through Robocopy
 If so please post me the exact syntax and tutorials or if there is any other way.
 Thanks
Avatar of NVIT
NVIT
Flag of United States of America image

It may help to expedite if you posted your code.
SOLUTION
Avatar of Andrew Leniart
Andrew Leniart
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lianne143

ASKER

I didn't use any code to delete this file , I went directly to E drive and right clicking the folder  and delete and "Item Not found" error
I also tried from windows explorer, the same error

Now I tried the below on the file server through command prompt

C:\>RMDIR /S /Q E:\SharedDrive\SCIENCE
The system cannot find the file specified.
The system cannot find the file specified.

C:\>e:

E:\>RMDIR /S /Q E:\SharedDrive\SCIENCE
The system cannot find the file specified.
The system cannot find the file specified.

E:\>

Also tried through my workstation

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>
C:\Windows\system32>RMDIR /S /Q \\FileServer\Shared\SCIENCE
The system cannot find the file specified.
The system cannot find the file specified.

C:\Windows\system32>
None of the sub folders that are within the Science folder are not getting deleted through windows explorer.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, that is correct,
I drilled down to every subfolders and tried to delete from the last folder and it is not allowing me to.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks
I tried deleting from the bottom most folders  and not able to delete.
Please see the attached snapshot of folder Structure,
Folder-structure.png
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks you so much for your help.
Pleasure lianne.. glad I was able to help and that you got it resolved.