Redirecting users to a File Share from within SharePoint

Just a quick note – you can use a dash of JavaScript and a splash of HTML to redirect users to a UNC path on a file share. We had an issue recently where a user wanted to load 400MB of reference material onto a SharePoint team site. Instead of allowing this travesty to go ahead, I compromised and wrote up the following htm file that did what they wanted without filling my Site’s space… It was data that was also being indexed by SharePoint on the file share, so it made sense to keep it there.
 
<script type="text/javascript">
<!–
window.location = "file://<Server Name>/DATA$/IT/Planning & Design Phase/2. Workstreams";
//delay
setTimeout("history.back()",2000);
//–>
</script>
 
Save it as a .htm file.
 
What this does is it opens a file manager window pointing to your UNC path, then after 2 seconds goes back in history on your browser (otherwise the users see a white page and don’t know what to do…).
B
Advertisements

About Brad Saide

I'm a SharePoint consultant. I'm also slowly going bald, seem to have a permanent spare tyre around my waist and enjoy socialising with friends over a beer or 10. The last 2 may possibly be related. Started working with SharePoint when the first version was in limited beta release (participated in the Technology Adoption Program while at Woolworths) and have been committed to the adoption of the technology as a business enabler ever since.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s