Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


Removes temporary files.

int _rmtmp( void );

_rmtmp returns the number of temporary files closed and deleted.

The _rmtmp function cleans up all temporary files in the current directory. The function removes only those files created by tmpfile; use it only in the same directory in which the temporary files were created.


Required header



For more compatibility information, see Compatibility in the Introduction.


All versions of the C run-time libraries.

See the example for tmpfile.

Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.

© 2015 Microsoft