[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to delete files in Delphi ?

Posted on 1998-07-29
3
Medium Priority
?
206 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

Technology Partners: 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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

650 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