• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: guess the file size of compressed file from the original
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guess the file size of compressed file from the original


  • Subject: Re: guess the file size of compressed file from the original
  • From: Bill <email@hidden>
  • Date: Sun, 27 Jun 2004 00:38:20 +0800

Here it is in AppleScript:
----
set sourceFile to (choose file)
set sourcePosix to quoted form of (POSIX path of sourceFile)
set dittoSize to do shell script "/usr/bin/ditto -c -k --sequesterRsrc
" & sourcePosix & " - | wc -c"

{(size of (info for sourceFile)) as integer, dittoSize as integer}
----

Ken,

Thanks a lot, you're so helpful :) Actually, my script is derived from your suggestion in another thread a few weeks ago ;)

My task is to compress file or folder into *.zip with a size less than 5MB, if the original one is too big, make several *.zip. Do you know is there any shell command, or applescript can do it?


TIA
bill
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: guess the file size of compressed file from the original
      • From: Graff <email@hidden>
  • Prev by Date: Re: Space left script
  • Next by Date: Smile sees Dictionary, SE doens't...
  • Previous by thread: Re: guess the file size of compressed file from the original
  • Next by thread: Re: guess the file size of compressed file from the original
  • Index(es):
    • Date
    • Thread