| | |
How to change DIRECTORY ATTRIBUTES through C or C++
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2004
Posts: 12
Reputation:
Solved Threads: 0
Hi Friends,
Can anyone tell how to change the attributes of a directory through C or C++.
I have tried to found in my compiler's help file but it was showing the method to change the file attributes but not the directory's.
I want to change the attributes of a directory from Read/Write to Read only and vice versa in my program.
Please help.......
Thanks in Advance.
Regards
Rituraj Raina
Can anyone tell how to change the attributes of a directory through C or C++.
I have tried to found in my compiler's help file but it was showing the method to change the file attributes but not the directory's.
I want to change the attributes of a directory from Read/Write to Read only and vice versa in my program.
Please help.......
Thanks in Advance.
Regards
Rituraj Raina
•
•
Join Date: Dec 2004
Posts: 11
Reputation:
Solved Threads: 0
You cannot make a directory readonly (at least, not in DOS). you can only make it's files and the files in it's subdirectories readonly. Even if you could make a directory readonly, it would be useless because directories are treated differently to files, even though they are just files with the directory attribute.
•
•
Join Date: Mar 2005
Posts: 53
Reputation:
Solved Threads: 1
•
•
•
•
Originally Posted by riturajraina
Hi Friends,
Can anyone tell how to change the attributes of a directory through C or C++.
I have tried to found in my compiler's help file but it was showing the method to change the file attributes but not the directory's.
I want to change the attributes of a directory from Read/Write to Read only and vice versa in my program.
Please help.......
Thanks in Advance.
Regards
Rituraj Raina
cheers,
aj.wh.ca
•
•
Join Date: Sep 2004
Posts: 12
Reputation:
Solved Threads: 0
Thanks a lot friends for your prompt help.
I think i have done a great exploration by finding this group.
I am sorry that i didn't explained my problem in detail in my last post.
Well better late than never.
Here it is.
Actually i am developing a project in which i have to keep the user's data in a folder which has been kept in a server(Win2k based) on my network.
The folder will be shared with all the users and all rights(read/write/modify etc.)will be granted to all the users on the folder(its a requirement of the my program).
Now my main worry is that since all the users will be granted full rights on the shared folders, hence if someone gets a mischief and he/she deletes all the contents of the shared folder , then all the userfull data of the users will be lost.
Hence i want to develop a mechanism in which only some users will be having all the rights while some users will be having readonly rights and I want this assignment of rights on the shared folder(installed on server) to be done through my C++ program (installed on client machines).
Can anyone suggest a remedy for this???
Thanks Again
Rituraj Raina
I think i have done a great exploration by finding this group.
I am sorry that i didn't explained my problem in detail in my last post.
Well better late than never.
Here it is.
Actually i am developing a project in which i have to keep the user's data in a folder which has been kept in a server(Win2k based) on my network.
The folder will be shared with all the users and all rights(read/write/modify etc.)will be granted to all the users on the folder(its a requirement of the my program).
Now my main worry is that since all the users will be granted full rights on the shared folders, hence if someone gets a mischief and he/she deletes all the contents of the shared folder , then all the userfull data of the users will be lost.
Hence i want to develop a mechanism in which only some users will be having all the rights while some users will be having readonly rights and I want this assignment of rights on the shared folder(installed on server) to be done through my C++ program (installed on client machines).
Can anyone suggest a remedy for this???
Thanks Again
Rituraj Raina
•
•
Join Date: Mar 2005
Posts: 53
Reputation:
Solved Threads: 1
Hi Rituraj ,
Unless you have some other requirement for the program you are trying to develop I would call it re-inventing the wheel. For the purpose you have written, I would strongly suggest that you use Win2K control panel. You can easily assign rights on a folder (which has users data) on a per user basis. Its a very simple task that way.
regards,
aj.wh.ca
Unless you have some other requirement for the program you are trying to develop I would call it re-inventing the wheel. For the purpose you have written, I would strongly suggest that you use Win2K control panel. You can easily assign rights on a folder (which has users data) on a per user basis. Its a very simple task that way.
regards,
aj.wh.ca
•
•
Join Date: May 2005
Posts: 1
Reputation:
Solved Threads: 0
hi, i am also interested in modifying a files attributes using C++. Symbian OS as far as I know how has no OS built in commands for modifying a files attributes... It works on the same basis of windows attributes, because files modified on an mmc by windows retain the same attributes in Symbian OS. I was wondering if anyone has a method coded into C++ for modiyfing file attributes, particularly hidden/not hidden...
Many thanks.
Many thanks.
![]() |
Similar Threads
- cannot change directory in cmd. (Windows NT / 2000 / XP)
- change window attributes in body onload.. (JavaScript / DHTML / AJAX)
- Need DOS help (Windows 95 / 98 / Me)
Other Threads in the C++ Forum
- Previous Thread: help
- Next Thread: Skeleton for a game.
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file forms fstream function functions game generator getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets





