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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting file from programs

Status
Not open for further replies.

Sherak

Programmer
Sep 1, 2003
83
GB
Hi,

I have an app that creates files full of data however I would also like to delete files certain files once they are not required anymore, is this possible to do from the program?..

Thanks
 
DeleteFile(
"yourFileName.xxx");


Ion Filipski
1c.bmp
 
You might also want to look at this as well


if ( FileExists ( "filename" ) )
DeleteFile ( "filename");

Just to avoid errors....

Also there there is

TDateTime fdt = FileDateToDateTime ( FileAge ( "filename") );
This would also give you date and time properties for the file you want to delete etc....

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top