Hi,
I want to open directory from my machine in write mode. So i can delete files from that folder. Will someone help me by giving one example. I also want to know in what situation directory can not be open in write mode...
To delete a read-only file, first you must remove the read-only attribute.
To delete or rename a file, you must have either delete permission on the file, or delete child permission in the parent directory.
To delete files use DeleteFile() API.
To remove empty directories use RemoveDirectory().
To recursively delete the files in a directory, use the SHFileOperation() function.
k, u gave very nice reply.
I have one problem. I want to open directory in write mode. If that directory has read-only access, creatfile() must return INVALID_HANDLE_VALUE otherwise handle value..
Can u give one example for that?
Ok buddy,
Thanks for your reply..
Actually i have new problem. I want to use createfile for directory, where specific user has Deny prvelages.. So what should i do?