Question

Temporary network path mapping (Windows)


Some UNC paths are very long (\\global\analysis\more\another\and\so\on\...), so it might be necessary to map the very long path to a drive letter for example. How can I do this and retain transportability across Windows platforms, and maybe other platforms?

At the moment I use a SystemCaller, and simply assign a drive letter I pick to the UNC path, e.g., 

SUBST X: \\global\analysis\etc\.

But, this is possibly going to be wrong at some stage, when X: is assigned by the admins without warning, well, maybe. 

In Windows there are various ways to get the next unused drive letter, one of which is 

PUSHD \\global\analysis\etc\

but, then how do I get the drive letter that is assigned, using the system caller?

Or, is there another way?


2 replies

Looks like the Unzipper transformer on the Hub has some useful functionality related to this?

 

 

Userlevel 4

You'll probably get more answers on a Windows server forum, but an alternative could be using mklink:

mklink /d  C:\Temp\Shares\analysis_etc \\global\analysis\etc\

This will map "\\global\analysis\etc\" to your local folder "C:\Temp\Shares\analysis_etc".

Reply