Board index » delphi » Delete file

Delete file

Have an app (D3) that uses the Mediaplayer for avi files. After
stopping the player, I try to delete the file from the App directory
without success.

Searched and found many references to SysUtil and win Api's Delete and
none work for me.

If I exit the the app, and run a small Delete file app with just the
Delete code, all is well. But, within my app, calling the external app
that deletes files will not execute properly.

Am I not releasing some file var?

Thanks for any help. Tim Mandeville vis...@home.com

 

Re:Delete file


"Tim Mandeville" <vis...@home.com> a crit dans le message news:
3b29b19a.8000282@news...

Quote
> Have an app (D3) that uses the Mediaplayer for avi files. After
> stopping the player, I try to delete the file from the App directory
> without success.

> Searched and found many references to SysUtil and win Api's Delete and
> none work for me.

> If I exit the the app, and run a small Delete file app with just the
> Delete code, all is well. But, within my app, calling the external app
> that deletes files will not execute properly.

Probably because your file is still loaded in the media player so can't be
erased. Load another file, or clear it, then it should work.

Other Threads