?
Solved

How to delete files in Delphi ?

Posted on 1998-07-29
3
Medium Priority
?
200 Views
Last Modified: 2010-04-04
Hi experts,

How can I delete a file in Delphi 3.0?

In Visual Basic, I would try it like this

Kill(filename).

How can this be done in Delphi language?

Yours sincerely

Christian
0
Comment
Question by:mathes
[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
3 Comments
 
LVL 5

Accepted Solution

by:
Christian_Wenz earned 200 total points
ID: 1359075
The following code erases the file DELETE.ME in the current directory:

DeleteFile('DELETE.ME');

(from delphi help)
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1359076
If you want in a different directory same thing as above but add the path to the file like thid...
DeleteFile('C:\windows\desktop\vik.txt');
that's only for deleting one file at a time..if you need to delete a whole directory then you need to use the TSHFileOpStruct that is declared in the ShellAPI...

Regards,
Viktor Ivanov
0
 

Author Comment

by:mathes
ID: 1359077
Thank you for your help and comments. Yes,the answer is indeed the help file of delphi. For a Delphi novice like me it is difficult to get a complete overview
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month8 days, 19 hours left to enroll

765 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