ChDrive Statement

현재 드라이브를 변경합니다.

warning

Some DOS-specific file and directory functions are no longer provided in Collabora Office, 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 Collabora Office. Therefore this feature is subject to removal in a future release.


note

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


Syntax:

ChDrive Text As String

Parameters:

Text: 새 드라이브의 드라이브 문자를 포함하는 임의의 문자열 식입니다. 필요하면 URL 표기법을 사용할 수 있습니다.

드라이브에는 대문자를 할당해야 합니다. Windows에서 드라이브에 할당하는 문자는 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!