Applescript: Open a Folder in Finder

后端 未结 3 1587
故里飘歌
故里飘歌 2021-01-04 04:52

I m trying to open a folder in Finder using AppleScript. The following is my code. I want the folder WorkSpace to open in Finder, but it opens the Parent Folder

3条回答
  •  生来不讨喜
    2021-01-04 05:33

    It's actually simpler than it seems:

    tell application "Finder" to open ("/Volumes/MyMacDrive/Mani/WorkSpace/" as POSIX file)
    

    or use colons to give an AppleScript path:

    tell application "Finder" to open "MyMacDrive:Mani:WorkSpace"
    

    with that you have an open window

提交回复
热议问题