Solved

UNC path redirect to different UNC path

Posted on 2014-03-19
6
707 Views
Last Modified: 2015-03-27
We have a server application that receives incoming EDI data to different folders under a specific UNC location; for example,

\\csvr2\folder1\folder2\data\edi1
\\csvr2\folder1\folder2\data\edi2
\\csvr2\folder1\folder2\data\edi3

and so on.  We have other applications/scripts that retrieve data from each of these folders, and they contain the UNC path.

Here's the problem...the new version of the server application installs to a completely different location:

\\csvr2\program files\new1\new2\new3\new4\data

So, now we have:
\\csvr2\program files\new1\new2\new3\new4\data\edi1
\\csvr2\program files\new1\new2\new3\new4\data\edi2
etc.

So, is there a method to redirect \\csvr2\folder1\folder2\data\ to \\csvr2\program files\new1\new2\new3\new4\data\ ?

I'm trying to avoid having to re-write multiple apps and scripts...

Group Policy?
DFS?
DNS?
Registry (server or client)?

The server hosting this app is a Server 2003 VM (Hyper-V), standard Windows domain (2008 functional level).

Many thanks in advance!

Mike
0
Comment
Question by:mporcellana
6 Comments
 
LVL 35

Accepted Solution

by:
Mahesh earned 500 total points
ID: 39941604
This is not possible in case of shared folders

Either you need to change the new software configuration to work with old shared paths or you need to change in scripts or where you entered the old paths
0
 
LVL 22

Expert Comment

by:Matt V
ID: 39942275
You could create symbolic links from \\csvr2\folder1\folder2\data\ to \\csvr2\program files\new1\new2\new3\new4\data\ on the application server.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa363878(v=vs.85).aspx
0
 
LVL 23

Expert Comment

by:Coralon
ID: 39944206
I'm with mattvmotas.  Depending on your OS, you can just create links for each of the directories.

If it is Win2k3, you'll want the junction.exe utility from SysInternals. http://technet.microsoft.com/en-us/sysinternals/bb896768.  If it is Win2k8+ then you can use mklink.exe.  

That's the best way by far.. the only problem will be is if the application doesn't respect the links.  (I've seen it happen, and for those, you pretty much don't have a way around it.)  If that is the case, you could in theory add some monitoring scripts that move the files from the directory they get dropped in into the the directory you need.

Coralon
0
 
LVL 42

Expert Comment

by:kevinhsieh
ID: 39944317
It looks to me like the application originally uses one UNC path, and now you are using a new path including a new share name. As an aside, are you really sharing out the Program Files directory? that seems really weird and a poor security practice. At any rate, you can use DFS Namespace to redirect a share to any other share.

My suggestion is to stop sharing the original folder1, and create an entirely new folder structure and share it out like the original share, and then create a new link data and point it to
your new share.

Create \\csvr2\folder1\folder2\ as a DFS namespace,  then add a link to data and point to
\\csvr2\program files\new1\new2\new3\new4\data

I hope that this is clear.
Windows 2003 Standard can host only one standalone DFS namespace.
http://technet.microsoft.com/en-us/library/cc753448.aspx
0
 

Author Comment

by:mporcellana
ID: 40692647
The developer finally got back to us...since it's a webserver-based app, it was a matter of placing 3 empty files with .apsx extensions in the "old" directory, and editing the config on the new version to point to them.

All is working well now.
0
 
LVL 42

Expert Comment

by:kevinhsieh
ID: 40692693
This is totally possible with DFS namespace, so the wrong answer was marked as correct. Fixing the application is better, but I wouldn't want someone to think that there is no solution when DFS namespace does work for this.
0

Join & Write a Comment

Learn about cloud computing and its benefits for small business owners.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now