Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > C++ Builder > Deleting files


Автор: StrikeTheCore 26.7.2006, 15:52
Hey,
Quick question (sorry about the English) that I was hoping someone on here would know the answer to. I am using Borland C++ Builder 6 on Windows XP and need to delete temporary files. I have been using system("ERASE temp.txt") but this temporarily opens a black shell window. Is there any way that these files can be deleted from within the program without using the windows shell?

Thanks,

-Brian 

Автор: dumb 26.7.2006, 16:05
DeleteFile("temp.txt");
or
::remove("temp.txt");  

Автор: StrikeTheCore 26.7.2006, 16:32
Thanks a lot for the fast reply. That did exactly what I needed.

-Brian 

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)