I set up a Tomcat app server on a ‘virtual’ hard drive. The virtual drive is assigned a local hard drive letter. But when a Groovlet attempts to access a local file, the file path used is on the default local drive, C:. How to allow access to the non-local file?
There are probably many ways to do this and of course corresponding security concerns. One of these is to use Universal Naming Convention (UNC) paths. My quick approach is to just use file directory symbolic links. These are supported in most windows versions. On Windows 7 the MKLINK command is available.
You want to access the folder w:\a\b\c on the virtual drive. On the “real” drive you create a link:
c: mkdir a\b mklink /D c w:\a\b\c
Now when the app server access the “c” folder via a UNC, \\mymachine\a\b\c, it will find it.
Duplicate post on other blog: Access local drive with UNC and mklink on Windows