ChDrive Statement

Ŝanĝas la aktualan diskingon.

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: Ĉena esprimo kiu enhavas la literon de la nova diskingo. Oni povas uzi URL-notacion.

Necesas atribui al la diskingo unuopan majusklon. Ĉe Windows, la litero atribuita al la diskingo limiĝas al la agordoj en LASTDRV. Se la inga atributo estas plurlitera, nur la unua litero uziĝos. Se oni provas aliri neekzistantan ingon, eraro okazos, al kiu oni povas respondi per ordono OnError.

Error codes:

5 Nevalida procedurvoko

68 Aparato ne disponebla

76 Path not found

Example:


  Sub ExampleChDrive
      ChDrive "D" REM Eblas nur se diskingo 'D' ekzistas.
  End Sub

Bonvolu subteni nin!