ChDrive Statement

αž”αŸ’αžαžΌαžšβ€‹β€‹αžŠαŸ’αžšαžΆαž™β€‹β€‹αž”αž…αŸ’αž…αž»αž”αŸ’αž”αž“αŸ’αž“Β αŸ”

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 αŸ– αž€αž“αŸ’αžŸαŸ„αž˜β€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžŽαžΆβ€‹αž˜αž½αž™ αžŠαŸ‚αž›β€‹αž˜αžΆαž“β€‹αž’αž€αŸ’αžŸαžšβ€‹αžŠαŸ’αžšαžΆαž™β€‹αž“αŸƒβ€‹αžŠαŸ’αžšαžΆαž™β€‹αžαŸ’αž˜αžΈΒ αŸ” αž”αŸ’αžšαžŸαž·αž“β€‹αž”αžΎβ€‹αž’αŸ’αž“αž€β€‹αž…αž„αŸ‹ αž’αŸ’αž“αž€β€‹αž’αžΆαž…β€‹αž”αŸ’αžšαžΎ αž€αŸ†αžŽαžαŸ‹ URLΒ αŸ”

αžŠαŸ’αžšαžΆαž™β€‹αžαŸ’αžšαžΌαžœβ€‹αžαŸ‚β€‹αž•αŸ’αžαž›αŸ‹β€‹αžαž˜αŸ’αž›αŸƒβ€‹αž’αž€αŸ’αžŸαžšβ€‹αž’αŸ†Β αŸ” αž“αŸ…β€‹αž€αŸ’αž“αž»αž„β€‹αžœαžΈαž“αžŠαžΌ αž’αž€αŸ’αžŸαžšβ€‹αžŠαŸ‚αž›β€‹αž’αŸ’αž“αž€β€‹αž•αŸ’αžαž›αŸ‹β€‹αž‘αŸ…β€‹αžŠαŸ’αžšαžΆαž™β€‹αž‚αžΊβ€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αžŠαžΆαž€αŸ‹β€‹αž€αž˜αŸ’αžšαž·αžβ€‹αžŠαŸ„αž™β€‹αž€αžΆαžšβ€‹αž€αŸ†αžŽαžαŸ‹β€‹αž€αŸ’αž“αž»αž„ LASTDRVΒ αŸ” αž”αŸ’αžšαžŸαž·αž“β€‹αž”αžΎβ€‹αž’αžΆαž‚αž»αž™αž˜αŸ‰αž„αŸ‹β€‹αžŠαŸ’αžšαžΆαž™β€‹αž‡αžΆβ€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžŠαŸ‚αž›β€‹αž˜αžΆαž“β€‹αž…αŸ’αžšαžΎαž“β€‹αž‡αž½αžš αž“αŸ„αŸ‡β€‹αž˜αžΆαž“β€‹αžαŸ‚β€‹αžαž½β€‹αž’αž€αŸ’αžŸαžšβ€‹αž‘αžΈβ€‹αž˜αž½αž™β€‹αž”αŸ‰αž»αžŽαŸ’αžŽαŸ„αŸ‡β€‹αžŠαŸ‚αž›β€‹αž‘αžΆαž€αŸ‹αž‘αž„Β αŸ” αž”αŸ’αžšαžŸαž·αž“β€‹αž”αžΎβ€‹αž’αŸ’αž“αž€β€‹αž”αŸ‰αž»αž“αž”αŸ‰αž„β€‹αžŠαŸ†αžŽαžΎαžšβ€‹αž€αžΆαžšβ€‹αžŠαŸ’αžšαžΆαž™β€‹αžŠαŸ‚αž›β€‹αž˜αž·αž“β€‹αž˜αžΆαž“ αž€αŸ†αž αž»αžŸβ€‹αž˜αž½αž™β€‹αž€αžΎαžβ€‹αž‘αžΎαž„β€‹αžŠαŸ‚αž›β€‹αž’αŸ’αž“αž€β€‹αž’αžΆαž…β€‹αž†αŸ’αž›αžΎαž™β€‹αžαž”β€‹αž‡αžΆαž˜αž½αž™β€‹αžŸαŸαž…αž€αŸ’αžαžΈβ€‹αžαŸ’αž›αŸ‚αž„β€‹αž€αžΆαžšαžŽαŸ OnErrorΒ αŸ”

Error codes:

5 αž€αžΆαžšβ€‹αž αŸ…β€‹αž”αŸ‚αž”αž”αž‘β€‹αž˜αž·αž“β€‹αžαŸ’αžšαžΉαž˜αžαŸ’αžšαžΌαžœ

68 αž˜αž·αž“β€‹αž˜αžΆαž“β€‹αž§αž”αž€αžšαžŽαŸ

76 αžšαž€β€‹αž˜αž·αž“β€‹αžƒαžΎαž‰β€‹αž•αŸ’αž›αžΌαžœ

Example:


  Sub ExampleChDrive
      ChDrive "D"  REM Only possible if a drive 'D' exists.
  End Sub

Please support us!