Solved

File Attributes

Posted on 2004-09-04
2
194 Views
Last Modified: 2010-04-01
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
Comment
Question by:fattumsdad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Expert Comment

by:avizit
ID: 11980790
0
 
LVL 17

Accepted Solution

by:
rstaveley earned 500 total points
ID: 11980822
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question