- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I'm using the intel fortran compiler. I realize that the subroutine 'PXFMKDIR' can create a directory. Could anyone tell me which subroutine (or function) can delete a directory containing some files?
I just want something different from the 'SYSTEM'-like functions.
Thank you in advance!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like you have the choice between deleting the files first, then deleting the directory by Posix or legacy QQ function calls, or shell commands like SYSTEM("rm -r ....") (soon to be replaced by execute_command_line)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To add to TimP's comment regarding SYSTEM, or soon to be replaced by execute_command_line, I suggest that the text that you use to provide the command comes from a resource file or "config" file as opposed to being hard coded into the application. The directory delete command name may depend upon the users shell choice (isdirectory delete aDEL, RMDIR, UNLINK, ...?). And as Tim eludes, the directory removal may or may not require pre-deletion of files (assuming none are open) and/or removal from focus by other processes (no other process having current directory as that which you wish to delete). If you want to bullet-proof and future-proof the directory delete operation, these issues, and maybe more, should be addressed.
Jim Dempsey
Jim Dempsey

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page