Prebuild events are commands that you can set for every project in your solution.
They will be executed before the build of your project starts.
In your case the DOS command ATTRIB will be executed against the file FILENAME.CS located in the current project folder. The ATTRIB command will be executed using the -r flag that will REMOVE the READONLY attribute for the file.
The syntax $(ProjectDir)
is just a Visual Studio substitution string. It is used to identify a particular folder in your project or solution. Here you can find a full list of available substitution strings along with a more elaborated explanation of Pre/Post build events