Solved

Simple folder redirection

Posted on 2004-04-14
2
349 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 500 total points
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 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

11 Experts available now in Live!

Get 1:1 Help Now