Solved

File Attributes

Posted on 2004-09-04
2
189 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
Comment Utility
0
 
LVL 17

Accepted Solution

by:
rstaveley earned 500 total points
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now