pipedowndjh Posted October 7, 2014 Share Posted October 7, 2014 All-- I have spent quite a bit of time over the past day or so trying to figure this one out without success. The goal of this workflow is to do the following: Highlight a Windows server path like \\filesrv01\folder\folder2 Convert it to smb://filesrv01/folder/folder2 Open this folder location In case it matters, the server to which I will be navigating does us AD authentication. So far, I have gotten as far as using the following workflow to convert the path: http://cloud.dferg.us/pkSA I had to change the script a bit to the following: path = "{query}"unc = ""parts = path.split('\\')parts.delete_at(0)unc = parts.join('/')print "smb:/#{unc}" Now that I have the correct form of the path, I cannot figure out how to just simply launch this. I would really rather avoid having to activate finder, hit command K, and then paste in the path. Some topics I have combed through on the forum are: http://www.alfredforum.com/topic/180-connecting-to-remove-servers/ http://www.alfredforum.com/topic/1248-mount-network-shares-with-automatic-discovery/ Any help would be appreciated. Thanks, Dan Link to comment
pipedowndjh Posted October 7, 2014 Author Share Posted October 7, 2014 Nevermind all. I actually figured this one out I just needed to add an osascript that did the following within the convert path workflow linked above: tell application "Finder" activate tell application "System Events" to key code 40 using command down tell application "System Events" to key code 9 using command down tell application "System Events" to key code 36end tell This opens Finder, hits Command K, hits Command V, and then hits Enter. I found the key codes by using the KeyCodes app here: http://manytricks.com/keycodes/ I hope this helps others out. Link to comment
deanishe Posted October 19, 2014 Share Posted October 19, 2014 You can actually just pass the smb://server/folder URL to Alfred's Open URL action. That has the advantage of opening the link in whichever app you've specified as the default handler for smb links, too. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now