Jul 28, 2003 #1 crackah Programmer Jul 18, 2003 7 US Does anybody know how you can make a compiled fortran 95 program print the current directory?
Jul 30, 2003 #2 Phil31 Programmer Sep 4, 2002 20 FR If you are using Windows, you can use the GetCurrentDirectory API function. For example : [tt] USE DFWIN ... CHARACTER(512) CurDirStr INTEGER(4) lrc ... lrc = GetCurrentDirectory(LEN(CurDirStr), CurDirStr) PRINT *, CurDirStr(1:lrc) [/tt] Upvote 0 Downvote
If you are using Windows, you can use the GetCurrentDirectory API function. For example : [tt] USE DFWIN ... CHARACTER(512) CurDirStr INTEGER(4) lrc ... lrc = GetCurrentDirectory(LEN(CurDirStr), CurDirStr) PRINT *, CurDirStr(1:lrc) [/tt]