HB_CWD

HB_CWD

Change working directory

Syntax

      HB_CWD( [ <cNewWD> ] ) -> <cPrevWD>

Argument

<cNewWD> : New working directory name to set

Return

<cPrevWD> : previous path if new one is set by optional parameter

Description

HB_CWD() can be use as DirName() and/or DirChange() depending on <cNewWD>.

Note

HB_CWD() seem as synonym of DirChange() with some extra features, such as : HB_CWD() function sets FError(). Programmer can check if HB_CWD() succeed checking result of FError() function, i.e.

          HB_CWD( cNewPath )
          IF FError() != 0
             ? "Cannot set working directory to:", cNewPath
          ELSE
             // stuff
          ENDIF

Example

      ? HB_CWD()
      ? HB_CWD( '\TEMP' )

Seealso

DirName(), DirChange()

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s