Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command that returns current directory?

Status
Not open for further replies.

crackah

Programmer
Jul 18, 2003
7
0
0
US
Does anybody know how you can make a compiled fortran 95 program print the current directory?
 
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]

[thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top