Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - curdir() return the current dos directory http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 curdir()            Return the current DOS directory
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   func char curdir extern
   param value int iDrive

 Arguments
   iDrive is the drive number (0 for default, 1 for drive A:, etc.).

 Return
   The current directory as character string.

 Description
   The curdir() function returns the current directory as defined by DOS.
   The returned directory name does not contain the drive specification. The
   first character of the string is a backslash.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_curdir
   ? curdir( 0 ) // print current working directory on the default drive
   ? chr( curdrive() + 'A' ) + ":"+ curdir( 0 ) // print full path name
   ? substr( curdir( 0 ), ;                     // print subdirectory name
      rat( "\", curdir( 0 ) ) + 1, 255 )
   endproc

   proc main
   Test_curdir()
   endproc

See Also: chdir() mkdir() rmdir() set default to

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson