• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

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
0
fattumsdad
Asked:
fattumsdad
1 Solution
 
avizitCommented:
0
 
rstaveleyCommented:
Have you tried quoting the filename (since it has spaces)?

e.g.

system("attrib +r \"c:\\program files\\microsoft office\\office\\outlook.exe\"");
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now