Solved

Delete a File?

Posted on 2002-03-26
4
160 Views
Last Modified: 2010-04-15
Hi!
How do I delete a file in C?
/Micke
0
Comment
Question by:mickehallgren
  • 3
4 Comments
 
LVL 30

Accepted Solution

by:
Axter earned 100 total points
ID: 6896054
Try remove function:

int remove( const char *path );


0
 
LVL 30

Expert Comment

by:Axter
ID: 6896056
Example:
remove("c:\\backup.bat");
0
 
LVL 30

Expert Comment

by:Axter
ID: 6896058
FYI:
You need to inlcude <stdio.h>
0
 

Author Comment

by:mickehallgren
ID: 6896086
Thanks! I found the answer at the same moment submitted my question... But I'll give you the points anyway.

/Micke
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

706 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

20 Experts available now in Live!

Get 1:1 Help Now