Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting folder. Denied in CMD, OK in Explorer

Status
Not open for further replies.

Stevehewitt

IS-IT--Management
Jun 7, 2001
2,075
GB
Hi All,

Got a folder on a local drive in Windows 2000 Server.

I need to delete this folder using a batch script, however when i run:

del /Q D:\svnback

I get "Access Denied"

Yet when using Windows Explorer the folder deletes with no problems.

I have also forced CMD to run under my credentials (runas) as the same result. Regardless if I script the del command or run it straight from the prompt.

Any ideas?

Thanks,




Steve.

"They have the internet on computers now!" - Homer Simpson
 
Does the directory contain subdirectories or any files that have read-only attributes? Try including the /R and /A options in your delete command. Hope this helps.
 
Thanks,

After a lot of digging around, it appears that there is indeed a read-only file. By that point I ended up using RD instead!

Thanks for your help,




Steve.

"They have the internet on computers now!" - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top