You don't need a command prompt for this.
Use SetFileAttributes(...) to change attributes of files.