Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Simple folder redirection

Posted on 2004-04-14
2
Medium Priority
?
359 Views
Last Modified: 2008-03-06
I have looked at the previous Q&A for folder redirection, and they all seem much too complicated for what I want to do. Our problem is this: We have a folder on a server containing hundreds of large graphic files, lets call it:
\\kal\e\sam\graphics

We have programs that are configured to see these same graphics in another folder, called:
\\kal\e\pete\graphics

It is not possible to reconfigure the program to look in \sam\graphics, because to do so would mess up other configuration settings. I realize that I could also duplicate all the graphics. This is also not practical, because there are too many, and they are constantly updated. What I want is for any program that is looking for a graphic in \\kal\e\pete\graphics to automatically look instead in \\kal\e\sam\graphics.

How can I do this? Thanks much!
0
Comment
Question by:cascade99
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 10829296
You could simply set a link, or a 'reparse point' in MS speak. See http://www.sysinternals.com/ntw2k/source/misc.shtml#junction and the accompanying program at http://www.sysinternals.com/files/junction.zip

From the page:

Junction
Win2K's version of NTFS supports directory symbolic links, where a directory serves as a symbolic link to another directory on the computer. For example, if the directory D:\SYMLINK specified C:\WINNT\SYSTEM32 as its target, then an application accessing D:\SYMLINK\DRIVERS would in reality be accessing C:\WINNT\SYSTEM32\DRIVERS. Directory symbolic links are known as NTFS junctions in Win2K. Unfortunately, Win2K comes with no tools for creating junctions - you have to purchase the Win2K Resource Kit, which comes the linkd program for creating junctions. I therefore decided to write my own junction-creating tool: Junction. Junction not only allows you to create NTFS junctions, it allows you to see if files or directories are actually reparse points. Reparse points are the mechanism on which NTFS junctions are based, and they are used by Win2K's Remote Storage Service (RSS), as well as volume mount points.

If you want to view reparse information, the usage for Junction is the following:

Usage: junction [-s] <directory or file name>

-s      Recurse subdirectories.


If you want to create or delete a junction, use Junction like this:

Usage: junction [-d] <junction directory> [<junction target>]

To delete a junction specify the -d switch and the junction name.
0
 

Author Comment

by:cascade99
ID: 10853889
This worked perfectly. Thanks very much! A couple words of advice to the next person trying this:
1. Junction does not seem to accept UNC paths. But that does not seem to matter.
2. The directory you wish to redirect needs to be empty.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

926 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