[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+---------+################################################################
#+-| CHDIR() |------------------------------------------+#####################
#| +---------+ Changes DOS directory for specific drive |#####################
#+------------------------------------------------------+#####################
##############################################################################
##############################################################################
#+--| Summary |----------------+##############################################
#| #INCLUDE system.hdr |##############################################
#+-----------------------------+##############################################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------------+############################
#| FUNCTION LOGICAL chdir PROTOTYPE |############################
#| PARAMETERS CONST CHAR directory_name |############################
#+-----------------------------------------------+############################
##############################################################################
##############################################################################
#####+---| Description |------------------------------------------------+#####
#####| The chdir() function changes the current DOS directory to |#####
#####| directory_name. directory_name may include a drive designation. |#####
#####| ---------------------------------------------------------------- |#####
#####| Use chdir() instead of SET DEFAULT TO because chdir() returns |#####
#####| information as to whether or not it was successful (You do not |#####
#####| get any information back from the SET DEFAULT TO command). |#####
#####+------------------------------------------------------------------+#####
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Get a directory name from a user. |#########
#########| |#########
#########| @ x,y SAY "Which dir: " GET dirname |#########
#########| READ |#########
#########| IF .NOT. chdir( dirname ) |#########
#########| {...} |#########
#########| ENDIF |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Get the current directory when a program |#########
#########| * starts so it can be reestablished when |#########
#########| * the program terminates. |#########
#########| |#########
#########| current_directory = curdir( 0 ) |#########
#########| {...} |#########
#########| success = chdir( current_directory ) |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
critical
curdir()
curdrive()
mkdir()
rmdir()
SET DEFAULT TO
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson