## f_chdrive

The f_chdrive function changes the current drive.

    FRESULT f_chdrive (
      BYTE Drive /* Logical drive number */
    );

#### Parameters

Drive
  Specifies the logical drive number to be set as the current drive.

#### Return Values

FR_OK (0)
  The function succeeded.
FR_INVALID_DRIVE
  The drive number is invalid.

#### Description

The f_chdrive function changes the current drive. The initial value of the current drive number is 0. Note that the current drive is retained in a static variable so that it also affects other tasks that using the file functions. This function is available when `_FS_RPATH == 1`.

#### References

`f_chdir`

Return