Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Script to replace trailing slash for forward slash in samba address?

Hey.


I get sent maybe 2 / 3 shared network folders a day. It's driving me mad having to CMD+K in Finder, cut n paste the address then prepend "smb://", followed by replacing all the trailing slashes in the address for foward slashes.


ie shareddrive\folder\another folder\yet another folder\guess what a folder\folder\


becomes


smb://shareddrive/folder/another folder/yet another folder/guess what a folder/folder/



I've googled it but maybe I'm using the wrong terminology, cos I can't seem to find a solution.Can anyone help?


A drag n drop Script that opens the share would be great, or better yet a contextual menu plugin for Entourage/Mail.app. Any helpers?


Surely I'm not the only one in the world with this problem??

Posted on Jan 12, 2012 5:03 AM

Reply
Question marked as Best reply

Posted on Jan 12, 2012 4:07 PM

To clarify: you're receiving this folder locations in an email? Are you using Mail or Entourage? (Or both?)


From Mail, drag the folder path to the desktop. This will create a .netloc file, as long as it uses the proper UNC structure starting with a double backslash. For example, if you're sent:


\\192.168.1.1\inetpub


place your cursor over the path, (it will most likely be a link,) and drag to the desktop. In my tests, this has Finder open an SMB share.


If you are being sent paths as in your example, without the leading backslashes, the drag method will not work. You'll just get a text clipping. If you are being sent paths with a drive letter, then obviously the drag method won't work since OSX doesn't use drive letters.


The drag method doesn't seem to work in Outlook 2011. I don't have Entourage readily available, but it wouldn't surprise me if the drag method didn't work either.


Someone could probably write an Automator workflow or an Applescript.

3 replies
Question marked as Best reply

Jan 12, 2012 4:07 PM in response to dariusperkins

To clarify: you're receiving this folder locations in an email? Are you using Mail or Entourage? (Or both?)


From Mail, drag the folder path to the desktop. This will create a .netloc file, as long as it uses the proper UNC structure starting with a double backslash. For example, if you're sent:


\\192.168.1.1\inetpub


place your cursor over the path, (it will most likely be a link,) and drag to the desktop. In my tests, this has Finder open an SMB share.


If you are being sent paths as in your example, without the leading backslashes, the drag method will not work. You'll just get a text clipping. If you are being sent paths with a drive letter, then obviously the drag method won't work since OSX doesn't use drive letters.


The drag method doesn't seem to work in Outlook 2011. I don't have Entourage readily available, but it wouldn't surprise me if the drag method didn't work either.


Someone could probably write an Automator workflow or an Applescript.

Jan 17, 2012 2:06 PM in response to dariusperkins

I can't believe that someone, somewhere hasn't written something that does this job.

Maybe they have, but realize that parsing the data in the file, then outputing another file is not a trivial task. More likely to be made as an app rather than a script. And once you start making apps, you probably then are going to charge for it since it's probably a lot more work to create, more work to maintain, yada, yada, yada. 😉

Script to replace trailing slash for forward slash in samba address?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.