Solved

File Attributes

Posted on 2004-09-04
2
191 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
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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

777 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