Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

delete a file

ekeom
Novice
1,506 Views
Hello,

I would like to know how to delete a file (located on the hard disk) using visual fortran.

Best regards,

Didace
3 Replies
TimP
Honored Contributor III
1,506 Views
Did you try the UNLINK library function? In Windows, it does require that the file you want to delete should be closed first.
0 Kudos
Steven_L_Intel1
Employee
1,506 Views
There are various ways to do this on Windows.

The DELFILESQQ library routine would be easiest, though you can also use UNLINK. You'll want to add USE IFPORT to the source. One can also do a CLOSE with DISP='DELETE'.
0 Kudos
ekeom
Novice
1,506 Views
Thank you very much, I had done it using the UNLINK function.

Didace
0 Kudos
Reply