You use the attrib command, and you can pass it up to 4 parameters which can be + or - r, a, s or h for readonly, archive, system, or hidden.
thus attrib +r helloworld.txt makes that file read only and attrib +r +a -s -h helloworld.txt sets the readonly and archive bits, and unsets the system and hidden bits