creating virtual hard Drive

前端 未结 4 721
你的背包
你的背包 2020-12-07 17:09

how can I create Virtual Hard Drive (like Z:) that store it\'s files on physical hard drive (Like C:\\Files).

4条回答
  •  悲&欢浪女
    2020-12-07 17:49

    You can use subst command. Use System.Diagnostic.Process to run the subst.exe with desired parameters.

    Here is the command syntax:

    Syntax

    Associates a path with a drive letter.

    SUBST [drive1: [drive2:]path] 
    SUBST drive1: /D
    

    drive1: Specifies a virtual drive to which you want to assign a path.

    [drive2:]path Specifies a physical drive and path you want to assign to a virtual drive.

    /D Deletes a substituted (virtual) drive.

    Type SUBST with no parameters to display a list of current virtual drives.list of current virtual drives.

提交回复
热议问题