Solved

Simple folder redirection

Posted on 2004-04-14
2
356 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

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…
Part Two of the two-part Q&A series with MalwareTech.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

622 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