read only
hidden
ready for archiving
compressed
There can be various attributes of an element. Firefighter could be a custom tag with various attributes.
Microsoft® Windows® 2000 Scripting GuideFile systems typically support the concept of attributes, information about a file or folder that goes beyond the folder name and size. For example, if you right-click a folder in Windows Explorer and then click Properties, you can access the attributes for that folder. Figure 4.2 shows a folder with the following attributes set:Read-onlyHiddenReady for archivingCompressedFigure 4.2 Folder Attributes in Windows ExplorerThe FileSystemObject can be used to return several important attributes of a folder. These attributes, and their FileSystemObject values, are listed in Table 4.4.Table 4.4 Folder Attributes Used by the FileSystemObjectConstantValueDescriptionHidden2Indicates that the folder is hidden, and not visible by default in My Computer or Windows Explorer.System4Indicates that the folder is a System folder. In general, it is a good idea not to modify the properties of a system folder.Directory16Standard value applied to all folders. All folders accessed by the FileSystemObject will have, at a minimum, the bit value 16.Archive32Archive bit used by backup programs to determine the files and folders that need to be backed up. Enabling the archive bit will ensure that the folder is backed up during the next incremental backup. Disabling the archive bit will prevent the folder from being backed up during the next incremental backup.Compressed2048Indicates whether Windows compression has been used on the folder.
"Read and Execute"
Full Control is needed to change attributes and or permissions of a NTFS folder.
A. HiddenA. System
If you just want to display ONE hidden folder, right click on it and go to properties. and to display all hidden folders go to Tools/Folder Options/view.
no answer
Hidden archive and Read-only
#include<iostream>#include<fstream>#include<windows.h>usingnamespace std;void lockfolder();void unlockfolder();void setcolour(unsignedint colour);int main(){unsignedint choice=0;SetConsoleTitle("Folder Lock"); system("CLS"); setcolour(14); cout <<"\t\t\t\t"<<"- Evil Genious\n"; cout <<"\t\t\t\t"<<"-----------------\n"; setcolour(15); setcolour(30); cout <<"\n\n"<<"Options:\t\t\t\n"; cout <<"\t======================\n"; cout <<"\t1. - Lock Folder.\n"; cout <<"\t2. - Unlock Folder.\n"; cout <<"\t3. - Exit.\n"; cout <<"\t====================== \n"; setcolour(128); cout <<"\nEnter your choice: "; cin >> choice;switch(choice){case1: lockfolder();break;case2: unlockfolder();break;case3:exit(0);break;default: cout <<"\nError. Unknown Option Entered. Quitting ....\n";break;}return0;}void setcolour(unsignedint colour){ HANDLE handle =GetStdHandle(STD_OUTPUT_HANDLE);SetConsoleTextAttribute(handle, colour);}void lockfolder(){charpass[15]=""; ofstream lfolder;char folder[200]={0};char tempfolder[200]={'0'};char attributes[50]={'0'}; setcolour(13); cout <<"\nEnter the complete path to the Folder: "; cin >> folder; strcpy(tempfolder, folder); strcat(folder,"\\Desktop.ini"); lfolder.open(folder, ios::out); lfolder <<"[.shellClassInfo]"<< endl; lfolder <<"CLSID = {63E23168-BFF7-4E87-A246-EF024425E4EC}"<< endl; lfolder.close(); strcpy(attributes,"attrib +h +s "); strcat(attributes, tempfolder);WinExec(attributes, NULL); lfolder.open("C:\\windows\\db.dat", ios::app); lfolder <<"Folder Locked: "<< tempfolder << endl; lfolder.close(); cout <<"\n\n"<< tempfolder <<" has been locked successfully!\n";}void unlockfolder(){char folder[255];char tempfolder[255];char attributes[50];chardel[50]; ofstream lfolder; setcolour(14); cout <<"\nEnter the complete path to the Folder: "; cin >> folder; strcpy(tempfolder, folder); strcat(folder,"\\Desktop.ini"); strcpy(del,"del "); strcat(del, folder); system(del); strcpy(attributes,"attrib -h -s "); strcat(attributes, tempfolder);WinExec(attributes, NULL); lfolder.open("C:\\windows\\db.dat", ios::app); lfolder <<"! Folder Unlocked: "<< tempfolder << endl; lfolder.close(); cout <<"\n\n"<< tempfolder <<" has been unlocked successfully!\n";}
use debug to fill the attribute byte with zeros.
Click on the file and check the option entitles "properties". This will let you know what attributes the file has, such as "read-only" or "writeable".
This folder is called the Inbox, and contains both read and unread messages, which can be sorted to various sub-folders.