Slater Posted April 10, 2014 Posted April 10, 2014 Hi Guys, I've been trying to get this one sorted for a couple of years now! Anyway, i more or less got it sorted via a script by Fenton Jones here. It is: Perform Applescript: Let ( [ info = GetAsText ( Contain ); vc = ValueCount ( info ); FM_path = GetValue( info; vc ); Mac_path = Substitute ( FM_path; ["imagemac:/"; ""]; ["filemac:/"; ""]; ["/"; ":"] ) ]; "tell application "Finder"¶" & "activate¶" & "reveal "" & Mac_Path & ""¶" & "end tell" ) So, it works fine apart from when the file's name has a space in it, ie "blah.txt" works but "blah blah.txt" doesn't. Does anyone have any suggestions as to how i can get this to work, or alternatively what would make it open just the containing folder (which i guess would get around the file name problem)? Many thanks for any help
comment Posted April 10, 2014 Posted April 10, 2014 alternatively what would make it open just the containing folder http://fmforums.com/forum/topic/79551-open-calculated-file-directory/#entry370547
Slater Posted April 10, 2014 Author Posted April 10, 2014 So, it works fine apart from when the file's name has a space in it, ie "blah.txt" works but "blah blah.txt" doesn't. Actually, this is not the case, as i've found a file with a space in it, that does work. The error when it doesn't work is Finder got an error: Can’t make "***:Users:***:Documents:Admin:***:*** ***.pages" into type item. And it's the Users:***: part that messes things up - when i relink the file, this part isn't included anymore, and the script then works! So ... now do i do all 400 of these files by hand, hmm!
Slater Posted April 10, 2014 Author Posted April 10, 2014 http://fmforums.com/forum/topic/79551-open-calculated-file-directory/#entry370547 Hi Comment, Many thanks for that - i had been trying earlier this morning with your file, to get the open folder button to work, but it doesn't work on my system for some reason, which was partly why i've gone this route because i couldn't figure out why! So ... now do i do all 400 of these files by hand, hmm! To get it to work automatically, i added a part to the substitution line of the script ["Users:***:"; ""] which took out the problem text, and made it work! Yay!!
Recommended Posts
This topic is 3879 days old. Please don't post here. Open a new topic instead.
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