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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

_rmdir doesn't work!! How to remove a directory?!?

Status
Not open for further replies.

SuperTeone

Programmer
Jun 25, 2001
6
IT
Hi!
I have to remove a directory, wich VC++ command do I have to use?!? "_rmdir" doesn't work even though and I've checked the basic conditions that have to be respected such as:
1) directory must be empty
2) directory to remove can't be the working directory

The command _rmdir simply return -1 without any effect. I'm working with VC++ 6.0 and Win NT Service Pack 6.

Please help!!!!

Thanks a lot,
Teo.
 
HeLLo,
are you sure that you are in a directory that have an access to the directory to be deleted ?
for example, if you want to delete the directory C:/Dir1/Dir2/Dir3
are you sure you are in Dir2 ?
see if it works, anher thing is that Windows NT have acces restriction to the directory, are you sure you have full control over that directory, and it's not marked Read Only or Archive ?
see these little things, this might be the only problem.
Have Fun
 
TEO,

Could you post the code that you are using.....I'm just curious. I need to do the same function later this week. I'll let you know if I can get it to work on my system.

/Jerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top