We did a restore from one server to another it was suppose to take just one folder but it took everything .
\nIt brought over allot of crap we dont need such as:<\/p>\n
I cannot seem to take ownership and I cannot delete them. Anyone have any idea how I can delete these? This is not a c:\\ drive it just took folders that copied to another drive on the server in error along with my restored files I needed. So they are useless. It says i need access from the trusted installer or access denied.<\/p>","upvoteCount":10,"answerCount":5,"datePublished":"2021-01-24T16:10:03.000Z","author":{"@type":"Person","name":"richdalrymple","url":"https://community.spiceworks.com/u/richdalrymple"},"suggestedAnswer":[{"@type":"Answer","text":"
We did a restore from one server to another it was suppose to take just one folder but it took everything .
\nIt brought over allot of crap we dont need such as:<\/p>\n
I cannot seem to take ownership and I cannot delete them. Anyone have any idea how I can delete these? This is not a c:\\ drive it just took folders that copied to another drive on the server in error along with my restored files I needed. So they are useless. It says i need access from the trusted installer or access denied.<\/p>","upvoteCount":10,"datePublished":"2021-01-24T16:10:03.000Z","url":"https://community.spiceworks.com/t/delete-folders-after-restore-issue/788432/1","author":{"@type":"Person","name":"richdalrymple","url":"https://community.spiceworks.com/u/richdalrymple"}},{"@type":"Answer","text":"
What did you choose to restore ?<\/p>\n
Else maybe give details like backup solution, steps took to restore etc.<\/p>\n
And what is your proficiency (not a punt) and position in the organization ?<\/p>","upvoteCount":0,"datePublished":"2021-01-24T18:27:14.000Z","url":"https://community.spiceworks.com/t/delete-folders-after-restore-issue/788432/2","author":{"@type":"Person","name":"adrian_ych","url":"https://community.spiceworks.com/u/adrian_ych"}},{"@type":"Answer","text":"
If this is a production environment I would be concerned that you are restoring data from backup (or simply copying data from a to b?) and you’ve ended up with problem permissions, and you don’t know how to delete data you don’t want.<\/p>\n
I don’t know what your exact situation is as you don’t seem to be able to explain it properly either, so obviously you do this at your own risk as I don’t know if the folders you are trying to delete are safe to delete. But if you are simply trying to delete folders and their contents which you currently can’t:<\/p>\n
Create a right click menu take ownership option (there is a reg file towards the bottom so you don’t have to do it manually): Right click the folder of which you want to delete the folder and all sub content and take ownership<\/p>\n<\/li>\n Once that’s completed, create an empty folder called purge (can be any name but we’ll call it this here) on the root of C:<\/p>\n<\/li>\n From an elevated command prompt run: Example: This will empty the target folder and you can then delete the folder itself.<\/p>\n Do this for each folder you want to delete then you can delete the C:\\Purge folder when you’re finished.<\/p>","upvoteCount":2,"datePublished":"2021-01-25T01:27:13.000Z","url":"https://community.spiceworks.com/t/delete-folders-after-restore-issue/788432/3","author":{"@type":"Person","name":"pc73357","url":"https://community.spiceworks.com/u/pc73357"}},{"@type":"Answer","text":"
\nhttps://www.google.com/amp/s/www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/amp/<\/a><\/p>\n<\/li>\n
\nrobocopy /purge C:\\purge “C:<path to the folder you want to delete>”<\/p>\n<\/li>\n<\/ul>\n
\nrobocopy /purge C:\\Purge “C:\\Restored Data\\Program Files”<\/p>\n