From: raj AT hlc DOT net (Rajen Shah) Subject: NTFS - Deleting Directory with sub dir and files 10 Jan 1997 15:17:41 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <32D68F64.72AF.cygnus.gnu-win32@hlc.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (WinNT; I) Original-To: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com Hello Every One, This is the first time I am posting the question to this listserv. I had ported a code written in c from DEC Unix to NT 3.51(Visual C++). I was using "rm -r dir" to delete the dir (subdir and files) in my code. I thought the "_rmdir", "RemoveDirectory" or the system call "deltree /Y" will work on NT. Unfortunately, any of the command will not work. I am not doing a change directory in the code even. I can understand if it is being currently being used, then it may give error and may not delete it. "_rmdir" and "RemoveDirectory" works on empty directory only. So, I went ahead and deleted the files underneith the dir by traversing the dir. in the code. But, it will be nice to delete the directory and subdirectories with files in one shot. If I use "_rmdir", it gives me the error no = 13. which is EACCES. Which tells me that the permission is denied. I checked the permission on the dir. It has read and write permission. I even issued an "access" routine/command from my code to check the permission. It is read and write. I can delete the directory from File Manager since I am logged in as admin. But, I can not do that from Dos prompt. From Dos Prompt, It seems like it is deleting the dir. It would not give any error message, but it does not delete it. I even tried replacing the permissions of subdirectories to Full Control from the root directory(c:\) for Everyone and Guest. If the information that I have provided is not enough to answer my question, please let me know. I will try to give more info. Any response is appreciated.... Thanks Rajen - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".