Pause Until / At this path / File exists - Wait for compression to finish

I’m compressing a folder in a finder window and need to wait until the compression is finished.

I tried "at this path, something exists’ problem is, it doesn’t wait for the folder to complete the compression.

I also tried basing the ‘pause time’ on the ‘compress’ menu availability and that didn’t work well either.

  • Any other suggestions to achieve the ‘wait until compression’ is finished?

Hey Troy,

Have you tried testing for the state of the Compress menu in the Finder?

You should be able to test for the compress window when zipping anything of size.

Whew!  Freaking Apple made me jump through hoops for this…

# Auth: Christopher Stone
# dCre: 2017/12/10 18:29
# dMod: 2017/12/10 18:29 
# Appl: Finder, System Events
# Task: Test for ongoing file or folder compression.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Finder, @System_Events, @Test, @Ongoing, @File, @Folder, @Compression

set ongoingZip to "false"

tell application "System Events"
   tell application process "Finder"
      if (get windows whose name is "Copy") ≠ {} then
         if (description of image 1 of scroll area 1 of window "Copy") = "compression" then
            set ongoingZip to "true"
         end if
      end if
   end tell
end tell





Hi Chris, thank you for the script - works great. - I also tried another ‘menu’ approach and the ‘new folder’ available works. thanx again.