jaypappas
asked on
Example of a C++ file that displays and manipulates file attributes
I am in need of anExample of a C++ program file that displays and/or manipulates file attributes
ASKER
This is a windows operating sysytem program. I need to manipulate read and write
Well - then here you go:
DWORD dwAtt = GetFileAttributes(_T("c:\\path\\file.txt");
// check for 'readonly'
if (dwAtt & FILE_ATTRIBUTE_READONLY) {
// remove 'readonly'
dwAtt &= ~FILE_ATTRIBUTE_READONLY;
SetFileAttributes(_T("c:\\path\\file.txt"),dwAtt);
}
ASKER
Is it a way to print a list of user/groups and what permission a user has on a file
OK, so yo uare talking about NTFS ACLs in that case? Yes, there is, but that's a bit more complicated. Could you be a bit more specific?
ASKER
I attached a sample file with a screen print of permissions. I want to list each user and group permissions and be able to modify permissions on the group and/or user.
file-attr.docx
file-attr.docx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Open in new window