• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1347
  • Last Modified:

UNC path redirect to different UNC path

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
mporcellana
Asked:
mporcellana
1 Solution
 
MaheshArchitectCommented:
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
 
Matt VCommented:
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
 
CoralonCommented:
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
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
kevinhsiehCommented:
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
 
mporcellanaAuthor Commented:
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
 
kevinhsiehCommented:
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

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now