Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

removing read-only attribute from files 2

Status
Not open for further replies.

biot023

Programmer
Nov 8, 2001
403
GB
Hallo.
Does anyone know how to remove the read-only attribute from a file (so that it can be deleted)?
Any & all help gratefully received.
Cheers,
Douglas JL.

A salesman is a machine for turning coke into obnoxious arrogance.

Common sense is what tells you the world is flat.

 
From the command line;
attrib -r [drive:] [path] [filename]

From the user interface:
File | Properties

-----------------------------------
Wisdom doesn't always come with age. Sometimes age comes alone.
(you're never too old to learn)
 
To do it manually i use Windows Commander, it's a Norton Commander lookalike and it works like a charm, it can pack, unpack, move files, copy them, delete them, change attributes, send/recieve via FTP and a lot more.

Totte
 
Thanks alot, Wings - that looks like the one.
From the look of it, this is a Borland command, which is cool.
But does anyone know a universal C++ way of doing this?
Thanks again,
DJL

A salesman is a machine for turning coke into obnoxious arrogance.

Common sense is what tells you the world is flat.

 
Look at access, chmod, fstat and stat. All of these should be compatable with DOS, *nix, and Windows. My notes are fairly old so I don't know if they are still supported or not.

James P. Cottingham
[sup]
There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
[/sup]
 
That's absolutely perfect, thanks!
chmod was the fella.
Thanks again, everyone.
DJL.

A salesman is a machine for turning coke into obnoxious arrogance.

Common sense is what tells you the world is flat.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top