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:

āĻĒāĻžāĻ ā§āĻ¯: āĻ¨āĻ¤ā§āĻ¨ āĻĄā§āĻ°āĻžāĻ‡āĻ­ā§‡āĻ° āĻĄā§āĻ°āĻžāĻ‡āĻ­ āĻ¨āĻŋāĻ°ā§āĻĻā§‡āĻļāĻ• āĻŦāĻ°ā§āĻŖ āĻŦāĻŋāĻļāĻŋāĻˇā§āĻŸ āĻ¯ā§‡āĻ•ā§‹āĻ¨ā§‹ āĻ¸ā§āĻŸā§āĻ°āĻŋāĻ‚ āĻāĻ•ā§āĻ¸āĻĒā§āĻ°ā§‡āĻļāĻ¨āĨ¤ āĻ†āĻĒāĻ¨āĻŋ āĻšāĻžāĻ‡āĻ˛ā§‡ URL āĻ¨ā§‹āĻŸā§‡āĻļāĻ¨ āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ° āĻ•āĻ°āĻ¤ā§‡ āĻĒāĻžāĻ°ā§‡āĻ¨āĨ¤

āĻĄā§āĻ°āĻžāĻ‡āĻ­āĻŸāĻŋ āĻ…āĻŦāĻļā§āĻ¯āĻ‡ āĻŦā§œ āĻšāĻžāĻ¤ā§‡āĻ° āĻ…āĻ•ā§āĻˇāĻ° āĻšāĻŋāĻ¸ā§‡āĻŦā§‡ āĻĒā§āĻ°ā§Ÿā§‹āĻ— āĻ•āĻ°āĻž āĻšāĻŦā§‡āĨ¤ āĻ‰āĻ‡āĻ¨ā§āĻĄā§‹āĻœā§‡āĻ° āĻ…āĻ§ā§€āĻ¨ā§‡, āĻĄā§āĻ°āĻžāĻ‡āĻ­ā§‡āĻ° āĻœāĻ¨ā§āĻ¯ āĻ†āĻĒāĻ¨āĻŋ āĻ¯ā§‡ āĻ…āĻ•ā§āĻˇāĻ° āĻŦāĻ°āĻžāĻĻā§āĻĻ āĻ•āĻ°ā§‡āĻ›āĻŋāĻ˛ā§‡āĻ¨ āĻ¤āĻž LASTDRV āĻāĻ° āĻ¸ā§‡āĻŸāĻŋāĻ‚ āĻĻā§āĻŦāĻžāĻ°āĻž āĻ¸ā§€āĻŽāĻžāĻŦāĻĻā§āĻ§ āĻĨāĻžāĻ•āĻŦā§‡āĨ¤ āĻ¯āĻĻāĻŋ āĻĄā§āĻ°āĻžāĻ‡āĻ­ āĻ†āĻ°āĻ—ā§āĻŽā§‡āĻ¨ā§āĻŸāĻŸāĻŋ āĻāĻ•āĻžāĻ§āĻŋāĻ• āĻ…āĻ•ā§āĻˇāĻ°āĻ¯ā§āĻ•ā§āĻ¤ āĻ¸ā§āĻŸā§āĻ°āĻŋāĻ‚ āĻšā§Ÿ āĻ¤āĻžāĻšāĻ˛ā§‡, āĻļā§āĻ§ā§āĻŽāĻžāĻ¤ā§āĻ° āĻĒā§āĻ°āĻĨāĻŽ āĻ…āĻ•ā§āĻˇāĻ°āĻŸāĻŋ āĻĒā§āĻ°āĻžāĻ¸āĻ™ā§āĻ—āĻŋāĻ• āĻšāĻŦā§‡āĨ¤ āĻ†āĻĒāĻ¨āĻŋ āĻ¯āĻĻāĻŋ āĻŦāĻŋāĻĻā§āĻ¯āĻŽāĻžāĻ¨ āĻ¨ā§Ÿ āĻāĻŽāĻ¨ āĻāĻ•āĻŸāĻŋ āĻĄā§āĻ°āĻžāĻ‡āĻ­ āĻĒā§āĻ°ā§Ÿā§‹āĻ— āĻ•āĻ°āĻ¤ā§‡ āĻšāĻžāĻ¨ āĻ¤āĻžāĻšāĻ˛ā§‡ āĻāĻ•āĻŸāĻŋ āĻ¤ā§āĻ°ā§āĻŸāĻŋ āĻ¸āĻ‚āĻ˜āĻŸāĻŋāĻ¤ āĻšāĻŦā§‡ āĻ¯āĻž OnError āĻ¸ā§āĻŸā§‡āĻŸāĻŽā§‡āĻ¨ā§āĻŸā§‡āĻ° āĻŽāĻžāĻ§ā§āĻ¯āĻŽā§‡ āĻœā§āĻžāĻžāĻĒāĻ¨ āĻ•āĻ°āĻ¤ā§‡ āĻĒāĻžāĻ°ā§‡āĻ¨āĨ¤

Error codes:

5 Invalid procedure call

68 Device not available 68 Device not available

76 Path not found 76 Path not found 76 Path not found

Example:


  Sub ExampleChDrive
      ChDrive "D" REM āĻ¸āĻŽā§āĻ­āĻŦ āĻ¯āĻĻāĻŋ āĻļā§āĻ§ā§āĻŽāĻžāĻ¤ā§āĻ° 'D' āĻ‰āĻĒāĻ¸ā§āĻĨāĻŋāĻ¤ āĻĨāĻžāĻ•ā§‡āĨ¤
  End Sub

Please support us!