Need help working from home with your Bentley software? We're here to help - click here
Sometimes it may be required to map a local folder to a drive. This could be necessary, for example, if you want to replicate on your home PC the same folder structure that you have on your work network.
Let's say for example that in work all the reference files for your project are stored in:
Where "X" is a local mapping to a shared folder on a server, e.g. \\server01\CAD\Files\
What you want to achieve is to have a copy of the above folder on your home PC so that, should you have to work on a DGN file at home, Microstation will be able to resolve all references, without having to define MS_RFDIR variable and if relative path isn’t working.
So you want to reproduce at home the same folder structure that you have in work but without having to set shared folders on a server, you want to keep everything local let's say on your laptop.
In order to do so you can copy the folder "X:\All Projects\References\" and all its content to one of your local drives on your home PC (e.g. "D"), creating an extra folder level:
Then, you can run the following command from an Elevated Dos Prompt (cmd.exe)
subst X: D:\WorkFiles
This will map D:\WorkFiles as a drive "X" in your Computer, so that all references "X:\All Projects\References\" path (originally: \\server01\CAD\Files\All Projects\References\) will be resolved to your local copy of the data stored in "D:\WorkFiles\All Projects\References\"
The above is only on example of an application for this trick, which can be very useful whenever there is a need to replicate a folder structure on two different environment.
In Windows 8 ensure that the subst command is run in a normal Command prompt window. If it is run at an Administrator Command Prompt the substitute drive letter will be created but will not be visible to the user's security context.
Persistent subst mapping?
Mapping does not persist across reboots. The subst command can be used to persistently map the local folder using batch files or logon scripts. Various examples of this can be found online.