File Attributes

In a console program, how do I change attributes on a specific file?  For example, Outlook.exe...  I've tried system("attrib -r c:/program files/microsoft office/office/outlook.exe"); to no avail.  Thanks in advance (again)!

Regards,
Tony
LVL 1
fattumsdadAsked:
Who is Participating?
 
rstaveleyConnect With a Mentor Commented:
Have you tried quoting the filename (since it has spaces)?

e.g.

system("attrib +r \"c:\\program files\\microsoft office\\office\\outlook.exe\"");
0
 
avizitCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.