Re: Bug or Spec ?
Re: Bug or Spec ?
- Subject: Re: Bug or Spec ?
- From: Takaaki Naganoya <email@hidden>
- Date: Mon, 13 Nov 2017 16:51:01 +0900
I found the System Events can detect the existence of the file after renaming.
<AppleScript>
set aa to choose file
tell application "System Events"
set a1 to (exists of aa) as string
set a2 to (class of aa) as string
set a3 to (name of aa) as string
display dialog a1 & "-" & a2 & "-" & a3
set name of aa to "changed_YYYYY"
set b1 to (exists of aa) as string
display dialog b1
end tell
</AppleScript>
--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/
> 2017/11/13 16:05、Takaaki Naganoya <email@hidden>のメール:
>
> I know about macOS 10.13 can not detect file existence after renaming via
> Finder.
>
> This code change the name of your selected file and check the existence.
>
> On macOS 10.12.6, this code runs as we expected (true).
> On macOS 10.13.2 beta2, this code returns “false" on the second dialog.
>
>
> (1) This is Finder or alias manager’s bug.
> (2) This is normal behavior of APFS
>
> I can not make a judgement about this.
>
>
> <AppleScript>
> set aa to choose file
>
> tell application "Finder"
> set a1 to (exists of aa) as string
> set a2 to (class of aa) as string
> set a3 to (name of aa) as string
>
> display dialog a1 & "-" & a2 & "-" & a3
>
> set name of aa to "changed4"
>
> delay 60
>
> set b1 to (exists of aa) as string
> display dialog b1
>
> end tell
> </AppleScript>
>
> --
> Takaaki Naganoya
> email@hidden
> http://piyocast.com/as/
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >Bug or Spec ? (From: Takaaki Naganoya <email@hidden>) |