PDA

View Full Version : URL hyperlink sent via e-mail becomes scrambled


The late XV105
17th Dec 2011, 22:38
Background
I am a member of a society that uses Sugarsync's Magic Briefcase to keep all of our documents synchronised in near-real-time on each of our computers. In essence, the Magic Briefcase is a monitored folder on each PC, and any changes within it are silently replicated via Sugarsync's servers to the equivalent folder for everyone else. It works a treat and we can even access the documents via smartphone apps and web browser.

Question
I'm stumped with something that I thought would be easy-peasy - and perhaps is if I can learn the necessary trick: Sending a hyperlink in an e-mail which when clicked will directly open the target document in the Magic Briefcase on the User's own PC.

This is what I have done so far:


Recognised that each member will need to set up an environment variable since the Magic Briefcase will exist inside an inconsistent directory structure; as a minimum the PC Username will be different each time
Created an environment variable called MB with value C: \Users\TLXV105\Documents\Magic Briefcase. Note that the gap between C: and \ is to stop the syntax being treated as an emoticon on this website and becoming "C:\", that's all.
Tested that the environment variable works by typing the following in the Windows Explorer navigation field: %MB%\subfolder_name\test_document.doc. Bingo - test_document.doc opens in MS Word
If I paste the above URL in an e-mail hyperlink though and then send it to myself, it doesn't work because it has become scrambled. It doesn't matter what e-mail client I send and receive from (Outlook 2010, Thunderbird, and Yahoo web) or if I double quote the URL; it gets scrambled: %22%MB%%5Csubfolder_name%5Ctest_document.doc%22


How to solve this please?
It'd be a neat refinement to be able to send a link for each member to open a document on their own PC


Cheers!
TLXV

Capetonian
17th Dec 2011, 22:49
Not really an answer to your question, but if you can't get this to work on MB, you might try Dropbox, which I use for a similar purpose to keep documents synchronised between a group of about 15 people and it works well.

The late XV105
17th Dec 2011, 22:50
Thanks. I personally prefer Sugarsync to Dropbox :ok:

The Nr Fairy
18th Dec 2011, 07:02
If you're sending it via email, is your default setting to "send as HTML" ?

It's not actually a URL which you're pasting, forget the really technical term, and it looks to me like the email client this it *is* really a URL and does all the stuff it thinks should happen with URL encoding to make it survive transmission.

Saab Dastard
18th Dec 2011, 09:36
URL Encoding (http://blooberry.com/indexdot/html/topics/urlencoding.htm#whatwhy)

SD

The late XV105
18th Dec 2011, 21:22
Thanks, SD, I understand that, but how to solve the problem? Cutting and pasting the URL from the received e-mail, into a converter such as you linked, and then using it kinda defeats the objective.

I either need to stop the conversion (ie send the link as if it were "encapsulated" plain text and not actually seen as a link) or automatically interpret the conversion either on mail receipt or when the link is clicked in the received e-mail.

None of the options I have found in any of the sending mail clients allow me to do anything that has the slightest influence on stopping the encoding.

Spurlash2
18th Dec 2011, 22:18
I think may be what you are after. But maybe not!

Once a file has been synced to the cloud and everyones folder has been updated, wouldn't one of the following do the job?

Sending a File.
You can send a link to a file by email when you want to share a copy of a file. To send a file, select the file in SugarSync Manager, or the SugarSync Website, or from your SugarSync mobile app. Click Send File. Enter the recipient’s email address, a subject, and a message, and click Send.

When you send a file link by email:

SugarSync creates a copy of the file, which will be shared with your
recipient. If you update the file later, the recipient does not
automatically get access to the new version of the file.
The file is accessible to the recipient for 21 days.
You are notified by email when your recipient opens the file.
The recipient does not need to have a SugarSync account, and does
not need to sign into SugarSync to access the file.

Sharing a Public Link

A public link is an URL, or a path, straight to the file stored in the cloud. You can send the public link in an email or a text message, you can post it on your blog, or you can publish it to Facebook or Twitter. The recipient or website visitor can click the link at any time to download the latest version of the file.

To send a public link, log into My SugarSync website and browse to the file you want to share. Select the file to open the action box. From the action box, click Get Public Link and follow the steps to share the file.
The link you send is alive‖ link to the most current version of the file. If you make changes to the file, your recipients can click the link to download the updated version.

It’s easy to paste this link into your own email program and send it to your recipients. Since you are not sending the file as an attachment, you save tons of space in your mailbox.

The late XV105
19th Dec 2011, 21:14
Thanks for trying to help, Spurlash2, but this doesn't help. It is creating a link that will work locally - ie on the PC of the mail recipient since they will already have a copy of the file - that I'm trying to do.

Saab Dastard
19th Dec 2011, 22:17
I see what you are trying to do, but I don't think it's possible to use a system variable directly in a URL - the URL interpreter (browser) doesn't know what to do with it.

It is not Windows Explorer that is being used to open the "link" in the email - it's the default browser.

You can send an absolute path link such as C:\Users\TLXV105\Documents\Magic Briefcase\subfolder_name\test_document.doc and this will work, provided that the path exists on the target system.

In your case, I don't see why you need the variable (which is causing the problem), because for the variable to work, the path associated with it must exist on the target system, so it could just as well be an absolute path.

SD

The late XV105
19th Dec 2011, 23:03
Thanks, SD. Indeed it is with the PATH element that I have the problem.

The problem I have is that the absolute path differs on each PC. The Magic Briefcase is installed in My Documents, so as a minimum the User ID makes each absolute path unique; sure, I can paste C:\Users\TLXV105\Documents\Magic Briefcase\subfolder_name\test_document.doc as my URL, but if your Windows Username is not also TLXV105, clicking the link will not find the target document that already exists on your PC.

In practice, the fact that we are not all using W7 means that other factors change the Magic Briefcase location as well, so a pre-defined system variable is the only way I can think of to account for this.

Saab Dastard
20th Dec 2011, 08:00
You could script it, but sending people bits of VBS isn't a nice way to do things.

SD

The late XV105
20th Dec 2011, 16:58
You could script it, but sending people bits of VBS isn't a nice way to do things.

Indeed! To be fair though, scripting isn't even an option. All members bar two (which includes me) have no IS skills, so the solution has got to be completely noddy anyway.

Saab Dastard
20th Dec 2011, 22:45
A thought just struck me:

Have you tried creating the variable as say %VAR1% = username\documents, so that the string you send would then be c:\users\%VAR1%\document.doc.

I think that might work.

SD

The late XV105
23rd Dec 2011, 18:12
Thanks, SD; that's a nice idea.
I'll give it a go.

Stay tuned,
XV

The late XV105
23rd Dec 2011, 18:26
Well, it was a nice try, and I thought it was going to work when Word started. Having done so though, the document then failed to open as the URL is still scrambled as previously mentioned.