ChDrive Statement

Promjene u trenutnom drajvu.

warning

Some DOS-specific file and directory functions are no longer provided in LibreOffice, or their function is only limited. For example, support for the ChDir, ChDrive and CurDir functions is not provided. Some DOS-specific properties are no longer used in functions that expect file properties as parameters (for example, to differentiate from concealed files and system files). This ensures the greatest possible level of platform independence for LibreOffice. Therefore this feature is subject to removal in a future release.


note

The ScriptForge library in LibreOffice 7.1 introduces the FileSystem service with methods to handle files and folders in user scripts.


Syntax:


  ChDrive Text As String

Parameters:

Text: Bilo koji znakovni izraz koji sadrzi oznaku drajva, novog drajva. Ako zelite, mozete koristiti URL notation.

Drajvu se mora pristupiti velikim slovom. Za Windows, slova kojima se pristupa drajvu su ogranicena na postavke u LASTDRV. Ako je argument drajva znak sa vise karaktera, samo prvo slovo je bitno. Ako pokusate proistupiti nepostojecem darajvu, pojavljuje se greska na koju mozete odgovoriti sa OnError izjavom.

Error codes:

5 Invalid procedure call

68 Device not available

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err76 not found).

Example:


  Sub ExampleChDrive
      ChDrive "D" REM Samo je moguce ako drajv D postoji.
  End Sub

Please support us!