Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3879 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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 :)

Posted

 

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!

Posted

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!!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.